META-INF/services in JAR with Gradle

You place META-INF/services/org.example.plugins.PluginService in src/main/java, but it’s not a source, it’s a resource file, therefore it should be placed in resources folder according to Maven directory layout convention, that is src/main/resources/META-INF/services/org.example.plugins.PluginService In this case everything should work out of the box.

How to create an Android Library Jar with gradle without publicly revealing source code?

Note: The answer has been edited. Please see the 07/28/2014 update below. Here is a solution I ended up coming up with. There may be a better way available, but I have not found it yet. android { compileSdkVersion 18 buildToolsVersion “18.0.1” defaultConfig { minSdkVersion 10 targetSdkVersion 18 } sourceSets { main { java { … Read more

Only create executable jar-with-dependencies in Maven

I got it to work using the maven-jar-plugin and the single goal of maven-assembly-plugin like this <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.1.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <finalName>finalName</finalName> <archive> <manifest> <mainClass> mainClass </mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </execution> </executions> </plugin> Anyway the most important thing is to tell maven not to generate the … Read more

CLASSPATH, Java Buld Path (eclipse), and WEB-INF\LIB : what to use, when, and why?

The CLASSPATH you set in your environment affects only standalone Java applications, i.e. ones you run from a command prompt or an icon. As you’ve noticed, Eclipse ignores this. It sets up its own per-project classpaths. javac and java, if called from the command prompt, should/may honor this path, but it’s no longer considered great … Read more

How do you use a Java Library?

I believe if you put the jars in your classpath, you can import and use classes just like you would a standard library. Figuring out the classpath can be confusing, but you can just set it when you start your jvm. Your IDE may have options for it, too. Most java problems are classpath problems.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)