You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wendell Beckwith <wb...@gmail.com> on 2005/09/14 00:57:33 UTC

How to use maven-antrun-plugin?

I want to try and use the antrun plugin and I have the followin build 
element:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version>
<executions>
<execution>
<configuration>
<tasks>
<echo message="Hello Ant Run"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>


with the following output:

E:\dev\workspace\maven-hello-plugin>m2 -X antrun:run
+ Error stacktraces are turned on.
[DEBUG] Building Maven global-level plugin registry from: 
'E:\maven2\conf\plugin-registry.xml'
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and 
Settings\wbeckwit\.m2\plugin-registry.xml'
[INFO] Searching repository for plugin with prefix: 'antrun'.
[DEBUG] Skipping disabled repository central-plugins
[DEBUG] Skipping disabled repository central
[DEBUG] resolveMetaData: 
org.apache.maven.plugins:maven-antrun-plugin:pom:1.0-alpha-1-SNAPSHOT:Skipping
disabled repository central-plugins (
http://repo1.maven.org/maven2/plugins)
[DEBUG] resolveMetaData: 
org.apache.maven.plugins:maven-antrun-plugin:pom:1.0-alpha-1-SNAPSHOT:Skipping
disabled repository central (
http://repo1.maven.org/maven2)
[DEBUG] maven-antrun-plugin: using locally installed snapshot
[DEBUG] maven-antrun-plugin: using locally installed snapshot
[DEBUG] Skipping disabled repository central-plugins
[DEBUG] Skipping disabled repository central
[DEBUG] resolveMetaData: 
org.apache.maven.plugins:maven-plugin-parent:pom:2.0-beta-1-SNAPSHOT:Skipping
disabled repository central-plugins (
http://repo1.maven.org/maven2/plugins)
[DEBUG] resolveMetaData: 
org.apache.maven.plugins:maven-plugin-parent:pom:2.0-beta-1-SNAPSHOT:Skipping
disabled repository central (
http://repo1.maven.org/maven2)
[DEBUG] maven-plugin-parent: using locally installed snapshot
[DEBUG] maven-plugin-parent: using locally installed snapshot
[DEBUG] Skipping disabled repository central-plugins
[DEBUG] maven-antrun-plugin: using locally installed snapshot
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Maven Hello Plugin
[INFO] task-segment: [antrun:run]
[INFO] 
----------------------------------------------------------------------------
[DEBUG] 
org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.0-alpha-1-SNAPSH
OT (selected for runtime)
[DEBUG] ant:ant-launcher:jar:1.6.5 (selected for runtime)
[DEBUG] ant:ant:jar:1.6.5 (selected for runtime)
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] 
----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] 
----------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Sep 13 16:57:36 CDT 2005
[INFO] Final Memory: 1M/3M
[INFO] 
----------------------------------------------------------------------------

E:\dev\workspace\maven-hello-plugin>


I rebuild maven a couple of hours ago and all 68 tests past. However I 
noticed that I don't have an antrun install for 2.0-beta-1-SNAPSHOT, instead 
I have only a metadata file:

<metadata>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>2.0-beta-1-SNAPSHOT</version>
<versioning>
<snapshot />
</versioning>
</metadata>

The maven-metadata-local.xml has
<metadata>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versioning>
<latest>1.0-alpha-1-SNAPSHOT</latest>
<release>1.0-alpha-1-SNAPSHOT</release>
<versions>
<version>1.0-alpha-1-SNAPSHOT</version>
</versions>
</versioning>
</metadata>
>From this, I gather that the alpha version is correct.

Wb