Monday, March 10, 2008

Maven 2 External Dependencies

Been playing with Maven for a little while. I ran intro some trouble setting up dependencies that I manually installed on my local repository $USER_HOME\.m2\repository.

Maven Guide to installing 3rd party JARS describes how to do this. It's basically one command

mvn install:install-file -Dfile= -DgroupId= -DartifactId= -Dversion= -Dpackaging=

Now when I tried to mvn compile It failed and as part of the debug output stated:

[DEBUG] Artifact not found - using stub model: Unable to download the artifact from any repository

This error was due to the fact that the previous command didn't generate the pom file for every external jar that I added. By adding the -DgeneratePom=true solved the issue.

mvn install:install-file -Dfile= -DgroupId=-DartifactId= -Dversion= -Dpackaging= -DgeneratePom=true


Hope this helps.

On a side note, I know I haven't been publishing as regularly as I used to do it. I'm planning on be more religious about this. Lately I been also working with Websphere 6.1, RAD7 and other IBM tools. Now I know this are not open source and the intent of the log is to address open source technology, but since I belive it's going to be useful I'm going to post that anyway. Besides... its a blog not a publication :D

No comments: