Hi Paolo, Am Sonntag, 6. November 2011 schrieb Paolo Castagna :
> I was using Maven v2.2.1. > I noticed that after I run mvn clean install, if I run mvn clean package it > works (probably because some necessary artifact in this case is already > in my Maven local repository. > However, if your cache does not have any org.apache.stanbol artifact > in it, when I run mvn clean package I get this error: > > Missing: > ---------- > 1) > org.apache.stanbol:org.apache.stanbol.commons.stanboltools.datafileprovider:jar:0.9.0-incubating-SNAPSHOT > > [...] > > Path to dependency: > 1) > org.apache.stanbol:org.apache.stanbol.commons.solr.core:bundle:0.9.0-incubating-SNAPSHOT > 2) > org.apache.stanbol:org.apache.stanbol.commons.stanboltools.datafileprovider:jar:0.9.0-incubating-SNAPSHOT > > This is not really important, I can work around that using mvn clean > install. > This is normal behavior because the Stanbol modules have compile dependencies. So Maven ensures that based on the dependencies everything is built in the correct order. Each built module has to be stored in the local Maven repository to be available for other modules. Now a 'mvn package' does not store anything in the local repo and therefore the modules are missing and the dependencies can't be resolved. If you have a Maven project with many dependent modules (artifacts), a 'mvn package' will never succeed. You'll always have to use the 'mvn install' command. The 'mvn package' is only useful when building a single artifact - not the whole project. Hope that clarifies the Maven issue. Best, - Fabian -- Fabian http://twitter.com/fctwitt
