Monday, 14 February 2011

Maven how to add a dependency on a local Jar/ how to add a jar to the local Maven repository.

I spent nearly a day beating my head against the desk on a small Maven project that I had been working on trying to add a jar dependency in my POM.xml, for a group of web service stubs that I had created. The solution I discovered was to add a jar to the local repository.

Using the command line add the Jar file
mvn install:install-file -DgroupId=CustomerSvc -DartifactId=SvcStubs -Dversion=1.0 -Dfile=D:\NB7Projects\SvcStubs\dist\SvcStubs.jar -Dpackaging=jar -DgeneratePom=true

Add to the POM file a dependency:



No comments: