I probably need something like this question
Maven build assembly with dependencies
or maven assembly create jar with dependency and class path
How do I execute the executable jar ?
java -jar at commandline gives me Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
I have executable.jar created in my target directory and lib directory with all dependency jar under /lib directoty.
This is the snippet of my pom.xml.What should I be changing?
</dependencies>
<dependency>
<groupId><gId></groupId>
<artifactId><aId></artifactId>
<version><v></version>
</dependency>
<dependency>
<groupId>gI2</groupId>
<artifactId>aI2</artifactId>
<version>v</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.proj.app</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>