Reputation:
I packaged my java application using mvn clean package
. This produced two jars in my target
directory - one is myapp-0.1.2-SNAPSHOT.jar
and the other is myapp-0.1.2-SNAPSHOT-sources.jar
.
Can someone explain the difference between these two?
If I want to deploy my application to a server which one should I use?
Upvotes: 1
Views: 439
Reputation: 3040
myapp-0.1.2-SNAPSHOT-sources.jar
contains all your source code along with your project, during development it is easier to debug when the sources are attached. It is most likely generated by the maven-source-plugin
. You will likely find it configured in your pom.xml
. When deploying, use the other jar: myapp-0.1.2-SNAPSHOT.jar
Upvotes: 2