Suppose I have a Maven 2 Java project on my local machine. I build the project .jar file and push it to my local Maven repo, using mvn install.
Question:
How can I force Maven to also push the project sources jar to the local repo?
This is useful if I’ll use the above mentioned project as dependency while developing a new project, and can use the mvn eclipse:eclipse -DdownloadSources feature.
This snippet automatically installs / deploys a source jar from any install / deploy:
Use this link to check for the current version of the
maven-source-pluginOr from command line: