I encounter a problem that has been filed before (
http://jira.codehaus.org/browse/MNG-2433
), then closed but actually I think it is not solved yet !
I run maven with -o option. All artifacts are in my local repository (I am totally sure about this !) so there should have been no downloads ... but Maven tries to download artifacts and I can't understand why.
I have the following error message :
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.andromda.profiles.uml14:andromda-profile-service:xml.zip:3.3-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.andromda.profiles.uml14 -DartifactId=andromda-profile-service -Dversion=3.3-SNAPSHOT -Dpackaging=xml.zip -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.andromda.profiles.uml14 -DartifactId=andromda-profile-service -Dversion=3.3-SNAPSHOT -Dpackaging=xml.zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) fr.xxx.t4:t4-core-mda:pom:1.0-SNAPSHOT
2) org.andromda.cartridges:andromda-ejb3-cartridge:jar:1.0-SNAPSHOT
3) org.andromda.profiles.uml14:andromda-profile:xml.zip:3.3-SNAPSHOT
4) org.andromda.profiles.uml14:andromda-profile-service:xml.zip:3.3-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
fr.xxx.t4:t4-core-mda:pom:1.0-SNAPSHOT
from the specified remote repositories:
central (http://10.11.4.108:8080/artifactory/repo
),
andromda (http://10.11.4.108:8080/artifactory/repo
),
snapshots (http://10.11.4.108:8080/artifactory/repo
)
NOTE: Maven is executing in offline mode. Any artifacts not already in your local
repository will be inaccessible.
To help to reproduce the problem, note I use artifactory as a repository. I have the following config in pom.xml :
<repositories>
<repository>
<id>andromda</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
<repository>
<id>central</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>andromda</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>central</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
I tried with updatePolicy as "weekly" or "never" but it changed nothing.
I also have the following mirrors in maven settings.xml, but removing them changed nothing :
<mirror>
<id>andromda</id>
<mirrorOf>andromda</mirrorOf>
<name>AndroMDA Repository</name>
<url>http://10.11.4.108:8080/artifactory/repo</url>
</mirror>
<mirror>
<id>apache-incubator</id>
<mirrorOf>apache-incubator</mirrorOf>
<name>Apache Incubator Repository</name>
<url>http://10.11.4.108:8080/artifactory/repo</url>
</mirror>
I really think there is a bug somewhere, as we run maven with -o option, it should not try to download artifacts. Maybe a problem with transitive dependencies ? Or a problem with snapshots ?