jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-2941

Sometime SNAPSHOTs can not be downloaded in an an online build

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.5
  • Fix Version/s: None
  • Component/s: Artifacts and Repositories
  • Labels:
    None
  • Environment:
    All
  • Complexity:
    Intermediate

Description

When an offline build fails because a SNPSHOT was not available locally, the SNAPSHOT can not be downloaded during a subsequent online build. During the offline build a file maven-metadata-apache-snpshots.xml (with the following contents in this example) is created in .m2 repo:
<?xml version="1.0" encoding="UTF-8"?><metadata>
<groupId>org.apache.geronimo.genesis</groupId>
<artifactId>genesis</artifactId>
<version>1.2-SNAPSHOT</version>
</metadata>
All subsequent online builds fail to download this artifact from the repository with error message given below. After deleting the metadata file corresponding to the repository in which this artifact is available (maven-metadata-apache-snpshots.xml file in this example) , the artifact can be downloaded successfully.

This trace can be produced by any SNAPSHOT in any project, the following steps are for geronimo:
1. Delete the above SNAPSHOT from the local repo.
2. Build geronimo offlne, the build will fail.
3. Build online, the following message will be generated.
4. Delete the above metadata file, and build online, the SNAPSHOT will get downloaded successfully.

[INFO] Scanning for projects...
Downloading: http://people.apache.org/repo/m2-snapshot-repository/org/apache/ger
onimo/genesis/genesis/1.2-SNAPSHOT/genesis-1.2-SNAPSHOT.pom
[WARNING] Unable to get resource 'org.apache.geronimo.genesis:genesis:pom:1.2-SN
APSHOT' from repository apache-snapshots (http://people.apache.org/repo/m2-snaps
hot-repository)
Downloading: http://snapshots.repository.codehaus.org/org/apache/geronimo/genesi
s/genesis/1.2-SNAPSHOT/genesis-1.2-SNAPSHOT.pom
[WARNING] Unable to get resource 'org.apache.geronimo.genesis:genesis:pom:1.2-SN
APSHOT' from repository codehaus-snapshots (http://snapshots.repository.codehaus
.org)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.geronimo.genesis
ArtifactId: genesis
Version: 1.2-SNAPSHOT

Reason: Unable to download the artifact from any repository

org.apache.geronimo.genesis:genesis:pom:1.2-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
apache-snapshots (http://people.apache.org/repo/m2-snapshot-repository),
codehaus-snapshots (http://snapshots.repository.codehaus.org),
apache-incubator (http://people.apache.org/repo/m2-incubating-repository/),
tomcat-m2-repo (http://tomcat.apache.org/dev/dist/m2-repository)

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.apache
.geronimo.genesis:genesis for project: org.apache.geronimo.genesis.config:config
:pom:null
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:373)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:286)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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.project.ProjectBuildingException: Cannot find parent
: org.apache.geronimo.genesis:genesis for project: org.apache.geronimo.genesis.c
onfig:config:pom:null
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1198)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1214)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1214)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
aultMavenProjectBuilder.java:697)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
leInternal(DefaultMavenProjectBuilder.java:431)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
nProjectBuilder.java:195)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:523)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:455)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.apache.ge
ronimo.genesis:genesis' not found in repository: Unable to download the artifact
from any repository

org.apache.geronimo.genesis:genesis:pom:1.2-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
apache-snapshots (http://people.apache.org/repo/m2-snapshot-repository),
codehaus-snapshots (http://snapshots.repository.codehaus.org),
apache-incubator (http://people.apache.org/repo/m2-incubating-repository/),
tomcat-m2-repo (http://tomcat.apache.org/dev/dist/m2-repository)

at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:528)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(D
efaultMavenProjectBuilder.java:1194)
... 19 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable
to download the artifact from any repository

org.apache.geronimo.genesis:genesis:pom:1.2-SNAPSHOT

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
apache-snapshots (http://people.apache.org/repo/m2-snapshot-repository),
codehaus-snapshots (http://snapshots.repository.codehaus.org),
apache-incubator (http://people.apache.org/repo/m2-incubating-repository/),
tomcat-m2-repo (http://tomcat.apache.org/dev/dist/m2-repository)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:197)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:73)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepo
sitory(DefaultMavenProjectBuilder.java:482)
... 20 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to downl
oad the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Def
aultWagonManager.java:308)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:185)
... 22 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Sat Apr 07 23:01:19 EDT 2007
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-3415 Transfer errors cause junk metadata in the local repo

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Wendy Smoak added a comment - 07/Apr/07 11:09 PM

The default update policy is 'daily', so I think the behavior is as described.

http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_pluginRepository

You can change the update policy to 'always' or 'interval:###' for the snapshot repos, or use -U on the command line to force updates.

Show
Wendy Smoak added a comment - 07/Apr/07 11:09 PM The default update policy is 'daily', so I think the behavior is as described. http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_pluginRepository You can change the update policy to 'always' or 'interval:###' for the snapshot repos, or use -U on the command line to force updates.
Hide
Permalink
Anita Kulshreshtha added a comment - 08/Apr/07 8:57 AM

It will be nice if maven could distinguish between a non-existent SNAPSHOT and an 'updated' SNAPSHOT. In a project like geronimo being able to
download a single new SNAPSHOT without updating all the other existing SNAPSHOTs is very useful.

Show
Anita Kulshreshtha added a comment - 08/Apr/07 8:57 AM It will be nice if maven could distinguish between a non-existent SNAPSHOT and an 'updated' SNAPSHOT. In a project like geronimo being able to download a single new SNAPSHOT without updating all the other existing SNAPSHOTs is very useful.
Hide
Permalink
Arnaud Heritier added a comment - 07/Nov/09 3:44 PM

Perhaps this problem is related to MNG-4142.
The build tries to download : http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/genesis/genesis/1.2-SNAPSHOT/genesis-1.2-SNAPSHOT.pom
It shouldn't because it have to read metadata from the remote repo to download the timestamped version and not the -SNAPSHOT.

Show
Arnaud Heritier added a comment - 07/Nov/09 3:44 PM Perhaps this problem is related to MNG-4142. The build tries to download : http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/genesis/genesis/1.2-SNAPSHOT/genesis-1.2-SNAPSHOT.pom It shouldn't because it have to read metadata from the remote repo to download the timestamped version and not the -SNAPSHOT.

People

  • Assignee:
    Benjamin Bentmann
    Reporter:
    Anita Kulshreshtha
Vote (1)
Watch (1)

Dates

  • Created:
    07/Apr/07 10:51 PM
    Updated:
    31/Mar/10 11:04 AM
    Resolved:
    31/Mar/10 11:04 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.