NoClassDefFoundError on Maven dependency

By default, Maven doesn’t bundle dependencies in the JAR file it builds, and you’re not providing them on the classpath when you’re trying to execute your JAR file at the command-line. This is why the Java VM can’t find the library class files when trying to execute your code. You could manually specify the libraries … Read more

Finding the root directory of a multi module Maven reactor project

use ${session.executionRootDirectory} For the record, ${session.executionRootDirectory} works for me in pom files in Maven 3.0.3. That property will be the directory you’re running in, so run the parent project and each module can get the path to that root directory. I put the plugin configuration that uses this property in the parent pom so that … Read more

Can not set the final jar name with maven-assembly-plugin

You can specify the finalName property to give the jar the name you want, and specify that appendAssemblyId should be false to avoid the jar-with-dependencies suffix. The configuration below will output a jar called test.jar <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <finalName>test</finalName> <archive> <manifest> <mainClass>com.myapp.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <appendAssemblyId>false</appendAssemblyId> </configuration> </plugin>

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