You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier THIERRY <ol...@gmail.com> on 2008/10/01 09:36:26 UTC
Maven tries to download snapshots in offline mode
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
Re: Maven tries to download snapshots in offline mode
Posted by Olivier THIERRY <ol...@gmail.com>.
Hi,
I tried with Maven 2.0.6 and it doesn't work neither. Not it looks like the
problem has not been solved. Or maybe there's a use case for which it has
not been solved.
I just tried again with Maven 2.0.9 and I have exactly the same problem. Not
the same error than yesterday, I can't understand why !
I checked again that the artifacts are in my local repository : they are.
Here is the log :
-----------
GroupId: org.andromda.maven.plugins
ArtifactId: andromda-maven-plugins
Version: 3.4-SNAPSHOT
Reason: System is offline.
org.andromda.maven.plugins:andromda-maven-plugins:pom:3.4-SNAPSHOT
NOTE: Maven is executing in offline mode. Any artifacts not already in your
local
repository will be inaccessible.
-----------
We use Artifactory as a company repository.
We added the following mirrors in settings.xml :
-----------
<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>
<mirror>
<id>jboss</id>
<mirrorOf>jboss</mirrorOf>
<name>JBoss Repository</name>
<url>http://10.11.4.108:8080/artifactory/repo</url>
</mirror>
<mirror>
<id>central</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Repository</name>
<url>http://10.11.4.108:8080/artifactory/repo</url>
</mirror>
<mirror>
<id>apache-m2-snapshot</id>
<mirrorOf>apache-m2-snapshot</mirrorOf>
<name>JBoss Repository</name>
<url>http://10.11.4.108:8080/artifactory/repo</url>
</mirror>
-----------
And we have a parent pom for all our projects with this configuration for
repositories :
-----------
<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>apache-m2-snapshot</id>
<url>http://10.11.4.108:8080/artifactory/repo</url>
<snapshots>
<enabled>false</enabled>
</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>true</enabled>
<updatePolicy>daily</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
----
Hope it will help understand where the problem comes from.
Cheers,
Olivier
2008/10/1 Olivier THIERRY <ol...@gmail.com>
> 2008/10/1 Baptiste MATHUS <ml...@batmat.net>
>
> 2008/10/1 Jorg Heymans <jo...@gmail.com>
>>
>> > On Wed, Oct 1, 2008 at 10:47 AM, Baptiste MATHUS <ml...@batmat.net> wrote:
>> > > Before doing so, might be better to receive the blessing here from a
>> > maven
>> > > committer :).
>> >
>> > +1 for reopening, and looking at the ticket there is already enough user
>> > blessings to warrant it being reopened.
>> >
>>
>> Sure, but I also adviced to test the 2.0.6 before as it will help fixing
>> it:
>> the fix might be easier to do if we know this was working with 2.0.6 and
>> not
>> with 2.0.9, or if the fix simply never worked whatever the version.
>>
>> Cheers.
>> --
>> Baptiste <Batmat> MATHUS - http://batmat.net
>> Sauvez un arbre,
>> Mangez un castor !
>>
>
> I can't do the tests now because of a daily updatePolicy for my snapshots.
> But I will try tomorrow.
> But I remember I had also this problem with Maven 2.0.4
>
> --
> Seules 2 choses sont infinies : l'univers et la bêtise humaine ; et encore
> pour l'univers, je ne suis pas sûr … (Einstein)
>
--
Seules 2 choses sont infinies : l'univers et la bêtise humaine ; et encore
pour l'univers, je ne suis pas sûr … (Einstein)
Re: Maven tries to download snapshots in offline mode
Posted by Olivier THIERRY <ol...@gmail.com>.
2008/10/1 Baptiste MATHUS <ml...@batmat.net>
> 2008/10/1 Jorg Heymans <jo...@gmail.com>
>
> > On Wed, Oct 1, 2008 at 10:47 AM, Baptiste MATHUS <ml...@batmat.net> wrote:
> > > Before doing so, might be better to receive the blessing here from a
> > maven
> > > committer :).
> >
> > +1 for reopening, and looking at the ticket there is already enough user
> > blessings to warrant it being reopened.
> >
>
> Sure, but I also adviced to test the 2.0.6 before as it will help fixing
> it:
> the fix might be easier to do if we know this was working with 2.0.6 and
> not
> with 2.0.9, or if the fix simply never worked whatever the version.
>
> Cheers.
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>
I can't do the tests now because of a daily updatePolicy for my snapshots.
But I will try tomorrow.
But I remember I had also this problem with Maven 2.0.4
--
Seules 2 choses sont infinies : l'univers et la bêtise humaine ; et encore
pour l'univers, je ne suis pas sûr … (Einstein)
Re: Maven tries to download snapshots in offline mode
Posted by Baptiste MATHUS <ml...@batmat.net>.
2008/10/1 Jorg Heymans <jo...@gmail.com>
> On Wed, Oct 1, 2008 at 10:47 AM, Baptiste MATHUS <ml...@batmat.net> wrote:
> > Before doing so, might be better to receive the blessing here from a
> maven
> > committer :).
>
> +1 for reopening, and looking at the ticket there is already enough user
> blessings to warrant it being reopened.
>
Sure, but I also adviced to test the 2.0.6 before as it will help fixing it:
the fix might be easier to do if we know this was working with 2.0.6 and not
with 2.0.9, or if the fix simply never worked whatever the version.
Cheers.
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !
Re: Maven tries to download snapshots in offline mode
Posted by Jorg Heymans <jo...@gmail.com>.
On Wed, Oct 1, 2008 at 10:47 AM, Baptiste MATHUS <ml...@batmat.net> wrote:
> Well, if I were you, I would retry with maven 2.0.6 (the version where this
> bug was supposed to be fixed).
> Then, if it works with 2.0.6, you could consider reopen the bug as a
> regression.
>
> Before doing so, might be better to receive the blessing here from a maven
> committer :).
+1 for reopening, and looking at the ticket there is already enough user
blessings to warrant it being reopened.
Jorg
Re: Maven tries to download snapshots in offline mode
Posted by Baptiste MATHUS <ml...@batmat.net>.
Well, if I were you, I would retry with maven 2.0.6 (the version where this
bug was supposed to be fixed).
Then, if it works with 2.0.6, you could consider reopen the bug as a
regression.
Before doing so, might be better to receive the blessing here from a maven
committer :).
Cheers.
2008/10/1 Olivier THIERRY <ol...@gmail.com>
> 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
>
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !