maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter DiSalvo <peter.disa...@gmail.com>
Subject Error loading pom w/ Maven Ant Tasks 2.1.1 in Maven 3.0.3
Date Wed, 30 Mar 2011 16:50:43 GMT
This is my first time using a mailing list for help so hopefully I'm doing
this right.  I'm using Maven Ant Tasks 2.1.1 to read all my dependencies
from my pom.  This worked with Maven 2.2.1 but broke when i upgraded to
3.0.3.

In my pom I use maven-antrun-plugin 1.6 to launch my ant target:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>updateProps</id>
                        <phase>process-resources</phase>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/build.xml">
                                    <target name="update-properties"/>
                                </ant>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Then in my build.xml I get an error when i reference my pom:

<project name="PresentationFX" default="default" basedir="."
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
    <description>Builds, tests, and runs the project
PresenationFX.</description>

    <import file="nbproject/build-impl.xml"/>

    <path id="maven-ant-tasks.classpath"
path="nbproject/maven-ant-tasks-2.1.1.jar" />
    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
            classpathref="maven-ant-tasks.classpath" />

    <target name="-maven-retrieve">
        <artifact:pom file="${basedir}/pom.xml" id="maven.project"/>
<------------------ ERROR HERE
        <echo>Loaded pom from ${basedir}</echo>
        <artifact:dependencies
fileSetId="maven-ant-tasks.dependency.fileset" >
              <pom refid="maven.project"/>
        </artifact:dependencies>
        <pathconvert property="maven-ant-tasks.dependency.path" dirsep="/"
pathsep=":">
            <path>
                <fileset refid="maven-ant-tasks.dependency.fileset"/>
            </path>
        </pathconvert>
        <propertyfile file="nbproject/project.properties">
            <entry operation="=" key="maven.dependency.classpath"
value="${maven-ant-tasks.dependency.path}"/>
        </propertyfile>
    </target>
    <target name="-pre-compile" depends="-maven-retrieve"/>
    <target name="-pre-compile-single" depends="-maven-retrieve"/>

    <target name="done" depends="default">
        <echo>DONE</echo>
    </target>

    <target name="update-properties" depends="-maven-retrieve"/>
</project>

Here is the stack trace:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-antrun-plugin:1.6:run (updateProps) on
project presentation-fx: An Ant BuildException has occured: The following
error occurred while executing this line:
[ERROR] /Users/peter/myproject/build.xml:15: java.lang.NoSuchMethodError:
org.apache.maven.settings.RuntimeInfo.<init>(Lorg/apache/maven/settings/Settings;)V
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (updateProps) on
project presentation-fx: An Ant BuildException has occured: The following
error occurred while executing this line:
/Users/peter/myproject/build.xml:15: java.lang.NoSuchMethodError:
org.apache.maven.settings.RuntimeInfo.<init>(Lorg/apache/maven/settings/Settings;)V
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:597)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant
BuildException has occured: The following error occurred while executing
this line:
/Users/peter/myproject/build.xml:15: java.lang.NoSuchMethodError:
org.apache.maven.settings.RuntimeInfo.<init>(Lorg/apache/maven/settings/Settings;)V
    at
org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:283)
    at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message