|
[
Permalink
| « Hide
]
Brian Fox added a comment - 12/Feb/06 07:03 PM
Note: Sample attached above is incorrect. I'm still verifying if I can reproduce my real problem in a sample. I'll update the attachment or close the issue.
Attached a working sample.
Note: To get this to fail, you must build from the mid level project (in this case sample-parent2). I think the problem is that it goes down to the child module to begin resolving the poms but fails to go back up. In this case it works from the highest level and also from the child. Add:
<dependencies> to pom.xml and good-example will work. No, it still fails. You must build from "sample-project2" to see this problem. If you build from the root or from sample-jar it works fine. The trouble is when you are at an intermediate parent and try to build, it won't find it's own parent.
confirmed fixed by Brian Fox...I added a variant of good-sample.zip as it0097.
It seems that this bug is still in maven 2.0.4. I can reproduce the error of this issue. To reproduce the error your local repository has to be empty.
We have the same issue with maven 2.0.4.
Please reopen this bug. You must have a clean repository and build from the "middle" project. The log output is: [DEBUG] Searching for parent-POM: samplegroup:master::0.0.1 of project: samplegroup:frameworks:pom:0.0.1 in relative path: ../pom.xml This is although all projects have the same groupid. I have attached a use case for this. new test case with only 3 poms that fails with maven 2.0.4
Tested that this still occurs. Using the attached "mavenbugreport.zip". Make sure you haven't previously installed this. Cd into the midlevel pom (frameworks) and run mvn install:
[INFO] Failed to resolve artifact. GroupId: samplegroup Reason: Unable to download the artifact from any repository samplegroup:master:pom:0.0.1 from the specified remote repositories: [INFO] ------------------------------------------------------------------------ samplegroup:master:pom:0.0.1 from the specified remote repositories: at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:573) samplegroup:master:pom:0.0.1 from the specified remote repositories: at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:197) If you build this from the top level, everything is fine. Same problem for me with Maven 2.0.4 and 2.0.6. Build fails if it's started on a intermediate POM (= not top level POM but also no leaf in project hierarchy).
I've tried the good-sample attachment with 2.0.9, 2.0.6, and 2.0.4, and I can't get this sample to fail when I build from the leaf-node project. I'm on OS X...was this happening on windows?
You have to build from a middle project. Not a leaf-node one.
And make sure that no artifacts are already installed in the repository. Have you tried the test case mavenbugreport.zip? Verified that this is fixed in 2.0.7+, and integrated the example from mavenbugreport.zip into a new integration test.
Adding fix-for for both 2.0.10 and 2.1.0-M1, since 2.1.0-M1 will actually be released first and may not incorporate all of the eventual issue fixes released in 2.0.10.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||