Issue
The source code to the resulting JAR is in my project, abc.
The packaging of my pom.xml is "jar".
When I have done mvn package
I would like to see my JAR on the path ~/.m2/repository/com/acme/abc/abc/1.0.0/abc-1.0.0.jar (with all the other files there .md5, .sha1, .pom, etc.) so that I can pick it up from any other project. (This is in lieu of putting my JAR into Maven Central or Nexus, etc.)
I have been exploring maven-install-plugin with install-jar-lib, install-file, etc., different configuration, but to no avail.
When I build (mvn package
), I do not see ~/.m2/repository/com/acme/abc... at all yet under my local target directory, I see abc-1.0.0.jar. However, it appears that mvn install
does the job.
Solution
You simply have to run the command mvn install
to get your artifact into your maven local repository.
Answered By - Antonio Petricca