You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Matt Raible <mr...@gmail.com> on 2005/12/14 07:26:38 UTC

[M2.0.1] Ant tasks can't parse pom.xml

I tried upgrading my Maven 2 Ant Tasks' JAR tonight, and after doing
so, I'm getting the following error:

foxxy:~/dev/equinox mraible$ ant war
Buildfile: build.xml

init:
[artifact:dependencies] An error has occurred while processing the
Maven artifact tasks.
[artifact:dependencies]  Diagnosis:
[artifact:dependencies]
[artifact:dependencies] Unable to build project:
/Users/mraible/Work/equinox/pom.xml
[artifact:dependencies] Duplicate project ID found in
/Users/mraible/Work/equinox/pom.xml

BUILD FAILED
/Users/mraible/Work/equinox/build.xml:27: Unable to build project:
/Users/mraible/Work/equinox/pom.xml

Total time: 2 seconds
foxxy:~/dev/equinox mraible$

I haven't been able to find the "duplicate project id" the error is
referring to.  The strange thing is if I run "mvn package" on my
project, everything works fine with Maven 2.0.1.  If I revert my
maven-artifact-ant-2.0.1-dep.jar to maven-artifact-ant-2.0-dep.jar,
everything works as expected.

Here's how I declare the Maven Ant tasks in my build.xml:

    <target name="init" description="Initializes tasks and downloads
dependencies">
        <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="urn:maven-artifact-ant">
            <classpath>
                <pathelement
location="${basedir}/lib/maven-artifact-ant-2.0-dep.jar" />
            </classpath>
        </typedef>

        <artifact:pom file="pom.xml" id="maven.project"/>

Here's line 27 of build.xml:

        <artifact:dependencies pathId="compile.classpath"
filesetId="compile.fileset" useScope="compile">
            <pom refid="maven.project"/>
        </artifact:dependencies>

Thanks,

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2.0.1] Ant tasks can't parse pom.xml

Posted by Matt Raible <mr...@gmail.com>.
I've tried this on several machines and it seems that the JAR for
2.0.1 Ant Tasks simply doesn't work.  Does anyone have this working? 
Again, everything works fine using the 2.0 JAR.

Matt

On 12/13/05, Matt Raible <mr...@gmail.com> wrote:
> I tried upgrading my Maven 2 Ant Tasks' JAR tonight, and after doing
> so, I'm getting the following error:
>
> foxxy:~/dev/equinox mraible$ ant war
> Buildfile: build.xml
>
> init:
> [artifact:dependencies] An error has occurred while processing the
> Maven artifact tasks.
> [artifact:dependencies]  Diagnosis:
> [artifact:dependencies]
> [artifact:dependencies] Unable to build project:
> /Users/mraible/Work/equinox/pom.xml
> [artifact:dependencies] Duplicate project ID found in
> /Users/mraible/Work/equinox/pom.xml
>
> BUILD FAILED
> /Users/mraible/Work/equinox/build.xml:27: Unable to build project:
> /Users/mraible/Work/equinox/pom.xml
>
> Total time: 2 seconds
> foxxy:~/dev/equinox mraible$
>
> I haven't been able to find the "duplicate project id" the error is
> referring to.  The strange thing is if I run "mvn package" on my
> project, everything works fine with Maven 2.0.1.  If I revert my
> maven-artifact-ant-2.0.1-dep.jar to maven-artifact-ant-2.0-dep.jar,
> everything works as expected.
>
> Here's how I declare the Maven Ant tasks in my build.xml:
>
>     <target name="init" description="Initializes tasks and downloads
> dependencies">
>         <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
> uri="urn:maven-artifact-ant">
>             <classpath>
>                 <pathelement
> location="${basedir}/lib/maven-artifact-ant-2.0-dep.jar" />
>             </classpath>
>         </typedef>
>
>         <artifact:pom file="pom.xml" id="maven.project"/>
>
> Here's line 27 of build.xml:
>
>         <artifact:dependencies pathId="compile.classpath"
> filesetId="compile.fileset" useScope="compile">
>             <pom refid="maven.project"/>
>         </artifact:dependencies>
>
> Thanks,
>
> Matt
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2.0.1] Ant tasks can't parse pom.xml

Posted by Matt Raible <mr...@gmail.com>.
On 12/16/05, John Casey <jd...@yahoo.com> wrote:
> This issue is being tracked as MNG-1851
> (http://jira.codehaus.org/browse/MNG-1851), and I think I've got it fixed.
>
> I've deployed a snapshot of the ant tasks with dependencies, here:
>
> http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/maven-artifact-ant/2.0.2-SNAPSHOT/
>
> Would you mind taking it for a spin, to see if it works? If so, it will
> be part of an emergency release early next week.

Yes, this works.  Thanks John.

Matt

>
> Thanks,
>
> John
>
> Matt Raible wrote:
> > I tried upgrading my Maven 2 Ant Tasks' JAR tonight, and after doing
> > so, I'm getting the following error:
> >
> > foxxy:~/dev/equinox mraible$ ant war
> > Buildfile: build.xml
> >
> > init:
> > [artifact:dependencies] An error has occurred while processing the
> > Maven artifact tasks.
> > [artifact:dependencies]  Diagnosis:
> > [artifact:dependencies]
> > [artifact:dependencies] Unable to build project:
> > /Users/mraible/Work/equinox/pom.xml
> > [artifact:dependencies] Duplicate project ID found in
> > /Users/mraible/Work/equinox/pom.xml
> >
> > BUILD FAILED
> > /Users/mraible/Work/equinox/build.xml:27: Unable to build project:
> > /Users/mraible/Work/equinox/pom.xml
> >
> > Total time: 2 seconds
> > foxxy:~/dev/equinox mraible$
> >
> > I haven't been able to find the "duplicate project id" the error is
> > referring to.  The strange thing is if I run "mvn package" on my
> > project, everything works fine with Maven 2.0.1.  If I revert my
> > maven-artifact-ant-2.0.1-dep.jar to maven-artifact-ant-2.0-dep.jar,
> > everything works as expected.
> >
> > Here's how I declare the Maven Ant tasks in my build.xml:
> >
> >     <target name="init" description="Initializes tasks and downloads
> > dependencies">
> >         <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
> > uri="urn:maven-artifact-ant">
> >             <classpath>
> >                 <pathelement
> > location="${basedir}/lib/maven-artifact-ant-2.0-dep.jar" />
> >             </classpath>
> >         </typedef>
> >
> >         <artifact:pom file="pom.xml" id="maven.project"/>
> >
> > Here's line 27 of build.xml:
> >
> >         <artifact:dependencies pathId="compile.classpath"
> > filesetId="compile.fileset" useScope="compile">
> >             <pom refid="maven.project"/>
> >         </artifact:dependencies>
> >
> > Thanks,
> >
> > Matt
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M2.0.1] Ant tasks can't parse pom.xml

Posted by John Casey <jd...@yahoo.com>.
This issue is being tracked as MNG-1851 
(http://jira.codehaus.org/browse/MNG-1851), and I think I've got it fixed.

I've deployed a snapshot of the ant tasks with dependencies, here:

http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/maven-artifact-ant/2.0.2-SNAPSHOT/

Would you mind taking it for a spin, to see if it works? If so, it will 
be part of an emergency release early next week.

Thanks,

John

Matt Raible wrote:
> I tried upgrading my Maven 2 Ant Tasks' JAR tonight, and after doing
> so, I'm getting the following error:
> 
> foxxy:~/dev/equinox mraible$ ant war
> Buildfile: build.xml
> 
> init:
> [artifact:dependencies] An error has occurred while processing the
> Maven artifact tasks.
> [artifact:dependencies]  Diagnosis:
> [artifact:dependencies]
> [artifact:dependencies] Unable to build project:
> /Users/mraible/Work/equinox/pom.xml
> [artifact:dependencies] Duplicate project ID found in
> /Users/mraible/Work/equinox/pom.xml
> 
> BUILD FAILED
> /Users/mraible/Work/equinox/build.xml:27: Unable to build project:
> /Users/mraible/Work/equinox/pom.xml
> 
> Total time: 2 seconds
> foxxy:~/dev/equinox mraible$
> 
> I haven't been able to find the "duplicate project id" the error is
> referring to.  The strange thing is if I run "mvn package" on my
> project, everything works fine with Maven 2.0.1.  If I revert my
> maven-artifact-ant-2.0.1-dep.jar to maven-artifact-ant-2.0-dep.jar,
> everything works as expected.
> 
> Here's how I declare the Maven Ant tasks in my build.xml:
> 
>     <target name="init" description="Initializes tasks and downloads
> dependencies">
>         <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
> uri="urn:maven-artifact-ant">
>             <classpath>
>                 <pathelement
> location="${basedir}/lib/maven-artifact-ant-2.0-dep.jar" />
>             </classpath>
>         </typedef>
> 
>         <artifact:pom file="pom.xml" id="maven.project"/>
> 
> Here's line 27 of build.xml:
> 
>         <artifact:dependencies pathId="compile.classpath"
> filesetId="compile.fileset" useScope="compile">
>             <pom refid="maven.project"/>
>         </artifact:dependencies>
> 
> Thanks,
> 
> Matt
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org