Hi Alexandre, I had the same problem. It seems there is a problem in the transitive dependencies somewhere. My very ugly hack to get past this error was to copy the 2.0.1 versions into the 2.0 versions of maven-plugin-tools-api in my local repository - renaming the version of the file of course. I then created new sha1's for the files as well. Ugly, ugly, ugly :(
The path is <USER_SETTINGS>\.m2\repository\org\apache\maven\maven-plugin-tools-api /Henrik On 1/20/06, Alexandre Russel <[EMAIL PROTECTED]> wrote: > Hi, > I am following the Guide to Developing Ant Plugins, first example hello > world plugin: > here is the error and at the end of the mail the exact file I > used(cut/paste from the guide): > > > mvn install > [INFO] Scanning for projects... > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building Hello Plugin > [INFO] task-segment: [install] > [INFO] > ---------------------------------------------------------------------------- > [WARNING] > Artifact org.apache.maven:maven-plugin-descriptor:jar:2.0-beta-3 > retains local scope 'runtime' overriding broader scope 'compile' > given by a dependency. If this is not intended, modify or remove > the local scope. > > [WARNING] > Artifact > org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-7 retains > local scope 'runtime' overriding broader scope 'compile' > given by a dependency. If this is not intended, modify or remove > the local scope. > > [WARNING] > Artifact org.apache.maven:maven-plugin-tools-api:jar:2.0-beta-3 > retains local scope 'runtime' overriding broader scope 'compile' > given by a dependency. If this is not intended, modify or remove > the local scope. > > [INFO] [plugin:descriptor] > [INFO] > ---------------------------------------------------------------------------- > [ERROR] FATAL ERROR > [INFO] > ---------------------------------------------------------------------------- > [INFO] > org.apache.maven.tools.plugin.extractor.AbstractScriptedMojoDescriptorExtractor.extractMojoDescriptors(Ljava/util/Map;Lorg/apache/maven/plugin/descriptor/PluginDescriptor;)Ljava/util/List; > [INFO] > ---------------------------------------------------------------------------- > [INFO] Trace > java.lang.AbstractMethodError: > org.apache.maven.tools.plugin.extractor.AbstractScriptedMojoDescriptorExtractor.extractMojoDescriptors(Ljava/util/Map;Lorg/apache/maven/plugin/descriptor/PluginDescriptor;)Ljava/util/List; > at > org.apache.maven.tools.plugin.extractor.AbstractScriptedMojoDescriptorExtractor.execute(AbstractScriptedMojoDescriptorExtractor.java:34) > at > org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:69) > at > org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:95) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) > 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: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) > [INFO] > ---------------------------------------------------------------------------- > [INFO] Total time: 3 seconds > [INFO] Finished at: Fri Jan 20 10:43:32 CET 2006 > [INFO] Final Memory: 4M/8M > [INFO] ------------------------------------------------ > > > /hello-plugin$ tree > . > |-- pom.xml > |-- pom.xml~ > `-- src > `-- main > `-- script > |-- hello.build.xml > `-- hello.mojos.xml > > 3 directories, 4 files > /hello-plugin$ cat pom.xml > <project> > <modelVersion>4.0.0</modelVersion> > > <groupId>test</groupId> > <artifactId>hello-plugin</artifactId> > <version>1.0-SNAPSHOT</version> > > <packaging>maven-plugin</packaging> > > <name>Hello Plugin</name> > > <dependencies> > <dependency> > <groupId>org.apache.maven</groupId> > <artifactId>maven-script-ant</artifactId> > <version>2.0.1</version> > </dependency> > </dependencies> > > <build> > <plugins> > <plugin> > <!-- NOTE: We don't need groupId if the plugin's groupId is > org.apache.maven.plugins OR org.codehaus.mojo. > We also don't have to specify a version, since Maven can > automatically resolve the newest one. > --> > <artifactId>maven-plugin-plugin</artifactId> > > <!-- Add the Ant plugin tools --> > <dependencies> > <dependency> > <groupId>org.apache.maven</groupId> > <artifactId>maven-plugin-tools-ant</artifactId> > <version>2.0.1</version> > </dependency> > </dependencies> > > <!-- Tell the plugin-plugin which prefix we will use. > Later, we'll configure Maven to allow us to invoke this > plugin using the "prefix:mojo" shorthand. > --> > <configuration> > <prefix>hello</prefix> > </configuration> > </plugin> > </plugins> > </build> > </project> > /hello-plugin$ cat src/main/script/hello.mojos.xml > <pluginMetadata> > <mojos> > <mojo> > <goal>hello</goal> > > <!-- this element refers to the Ant target we'll invoke --> > <call>hello</call> > <description> > Say Hello, World. > </description> > </mojo> > </mojos> > </pluginMetadata> > /hello-plugin$ cat src/main/script/hello.build.xml > <project> > <target name="hello"> > <echo>Hello, World</echo> > </target> > </project> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
