Hi,
I encounter problems using snapshots and offline mode with Maven
2.0.9.Maven tries to download snapshots while it should not since I
run in offline
mode ! I checked the dependencies it tries to retrieve are already in mu
repository so I think this is really a bug with Maven. It looks like other
people have the same problem as there is a JIRA :
http://jira.codehaus.org/browse/MNG-2433 This JIRA has been closed, but it
was not solved, so I think it should be reopened !
What is strange is that I don't have the problem if I run "mvn install" on a
workstation with no network. But if I run "mvn -o install", the problem
occurs ! It should be the opposite, doesn't it ?
Here is the logs I have when running "mvn -o install". Hope it will help to
solve this very annoying bug :
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]
Path to dependency:
1) t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
2) t4:t4-utils:jar:1.0-SNAPSHOT
3) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
from the specified remote repositories:
apache-m2-snapshot (http://10.11.4.108:8080/artifactory/repo),
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.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
----------
1) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]
Path to dependency:
1) t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
2) t4:t4-utils:jar:1.0-SNAPSHOT
3) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
from the specified remote repositories:
apache-m2-snapshot (http://10.11.4.108:8080/artifactory/repo),
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)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:575)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException:
Missing:
----------
1) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=org.drools -DartifactId=drools-core
-Dversion=4.0.4M-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryId=[id]
Path to dependency:
1) t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
2) t4:t4-utils:jar:1.0-SNAPSHOT
3) org.drools:drools-core:jar:4.0.4M-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
t4:t4-core-utils-core:ejb:1.0-SNAPSHOT
from the specified remote repositories:
apache-m2-snapshot (http://10.11.4.108:8080/artifactory/repo),
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)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:324)
at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:288)
at
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1415)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:405)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 53 seconds
[INFO] Finished at: Wed Oct 01 09:14:56 CEST 2008
[INFO] Final Memory: 35M/63M
[INFO]
------------------------------------------------------------------------
Thanks in advance for your help
Olivier