If you ever need to have a JAR file someone’s given you show up in your maven repostory $HOME/.m2/repository, here is how you do it:

From: https://maven.apache.org/general.html#importing-jars and SO question

mvn install:install-file \
   -Dfile=<path-to-file> \
   -DgroupId=<group-id> \
   -DartifactId=<artifact-id> \
   -Dversion=<version> \
   -Dpackaging=<packaging> \
   -DgeneratePom=true

For example, to put the artifact com.steranka.play:just-a-test:1.0.1, I would use the command:

mvn install:install-file \
   -Dfile=/tmp/just-a-test.jar \
   -DgroupId=com.steranka.play \
   -DartifactId=just-a-test \
   -Dversion=1.0.1 \
   -Dpackaging=jar \
   -DgeneratePom=true

The above generates a POM file for the jar, if you have a POM as well you can leave off the -DgeneratePOM=true and run it again with with -Dpackage=pom to install the POM file as well.

Not sure what this is https://www.appsloveworld.com/java/100/2841/installing-a-jar-to-the-maven-repository-on-heroku.


<
Previous Post
Windows Symlinks And Junctions Setting Up Onedrive For Multiple Machines
>
Next Post
How Can I Open More Than 5 Shell Windows