[ http://jira.codehaus.org/browse/MANTTASKS-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=152348#action_152348 ]
Bruce Brouwer commented on MANTTASKS-87: ---------------------------------------- I think I have a problem that is related to this issue as well. If I have a pom that lists a parent pom using <relativePath> in the pom.xml, it seems that it ignores the relativePath and only looks in the local repository for the parent pom. I have gotten around this problem in my build script by doing this: {code:xml} <artifact:pom file="${path-to-parent-pom-as-defined-in-relativePath}" id="parentPom" /> <artifact:install pomrefid="parentPom" /> {code} But it doesn't seem right that I should be required to do this. {code:xml|title=build.xml} <project name="test" xmlns:artifact="org.apache.maven.artifact.ant"> <!-- These two lines shouldn't be necessary --> <artifact:pom file="parent-pom.xml" id="parent" /> <artifact:install pomrefid="parent" /> <!-- This line fails unless the previous two lines are there --> <artifact:pom file="pom.xml" id="pom"/> </project>{code} {code:xml|title=pom.xml} <project> <modelVersion>4.0.0</modelVersion> <groupId>com.gfs.test</groupId> <artifactId>main</artifactId> <parent> <groupId>com.gfs.test</groupId> <artifactId>parent</artifactId> <version>1.0.0</version> <relativePath>./parent-pom.xml</relativePath> </parent> <packaging>jar</packaging> <version>1.0.0</version> </project> {code} {code:xml|title=paremt-pom.xml} <project> <modelVersion>4.0.0</modelVersion> <groupId>com.gfs.test</groupId> <artifactId>parent</artifactId> <packaging>pom</packaging> <version>1.0.0</version> </project> {code} > Using a pom.xml for dependencies, in which the pom.xml has a parent pom.xml > will cause a "Error downloading parent pom" error > ----------------------------------------------------------------------------------------------------------------------------- > > Key: MANTTASKS-87 > URL: http://jira.codehaus.org/browse/MANTTASKS-87 > Project: Maven 2.x Ant Tasks > Issue Type: Bug > Components: POM Integration > Affects Versions: 2.0.9 > Environment: WindowsXP > Ant version 1.7.0 > Reporter: Jeff Campbell > Assignee: Herve Boutemy > Priority: Blocker > Attachments: CASE.tar.gz > > > Using a pom.xml for dependencies, in which the pom.xml has a parent pom.xml > will cause a "Error downloading parent pom" error. > This WAS NOT a bug with version 2.0.6 of the maven-ant-tasks (new issue to > maven-ant-tasks-2.0.7.jar and still an issue with the latest > maven-ant-tasks-2.0.8-SNAPSHOT.jar (as of the writting of this bug)). > Just to see if I had done something wrong with the pom.xml file I tried to > run a Maven goal against the pom.xml file. I found that if I run "mvn clean" > from this same directory (where the build.xml and pom.xml file is located), > using Maven-2.0.7, I get a build successfull (it was able to find the parent > pom.xml file... so this seems to be isolated to JUST the maven-ant-task not > being able to find the parent pom.xml) > **** Sample of the pom.xml file **** > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>intuit.sbconnect</groupId> > <artifactId>sbclogin</artifactId> > <version>1.0.3</version> > <name>SBCLogin</name> > > <parent> > <groupId>mygroup</groupId> > <artifactId>CommonPOM</artifactId> > <version>1.0.2</version> > </parent> > > <dependencies> > <dependency> > <groupId>myothergroup</groupId> > <artifactId>myartifact</artifactId> > <version>1.0</version> > </dependency> > </dependencies> > </project> > **** Line in Ant build.xml file that causes the error: **** > <artifact:pom id="maven.project" file="pom.xml"/> > **** Error that occurs when this line is executed in ant: **** > Error downloading parent pom: Missing: > ---------- > 1) mygroup:CommonPOM:pom:1.0.2 > Path to dependency: > 1) unspecified:unspecified:jar:0.0 > 2) mygroup:CommonPOM:pom:1.0.2 > ---------- > 1 required artifact is missing. > for artifact: > unspecified:unspecified:jar:0.0 > from the specified remote repositories: > central (http://repo1.maven.org/maven2) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira