RTFM is the message to myself.
http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks
.html
<build>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Create-Software-Version</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<echoproperties/>
<echo>
project.name=${project.name}
project.artifactId=${project.artifactId}
project.groupId=${project.groupId}
project.version=${project.version}
project.packaging=${project.packaging}
project.description=${project.description}
project.basedir=${project.basedir} </echo>
</tasks>
<sourceRoot>
${project.build.directory}/generated-sources/main/java
</sourceRoot>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-commons-net</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.7.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
And it works!
> -----Original Message-----
> From: Pilgrim, Peter [mailto:[email protected]]
> Sent: 17 August 2009 13:28
> To: Maven Users List
> Subject: Maven 2 Antrun Echoproperties
>
> Hi All
>
>
>
> I am trying to find the Maven 2 Antrun properties I can use.
>
>
>
> <build>
>
> <plugins>
>
> <plugin>
>
>
> <artifactId>maven-antrun-plugin</artifactId>
>
> <executions>
>
>
<execution>
>
>
> <id>Create-Software-Version</id>
>
>
> <phase>generate-sources</phase>
>
>
> <configuration>
>
>
> <tasks>
>
>
>
>
> <echoproperties/>
>
>
>
>
> <echo>
>
> project.name=${project.name}
>
> project.artifactId=${project.artifactId}
>
> project.groupId=${project.groupId}
>
> project.version=${project.version}
>
> project.packaging=${project.packaging}
>
> project.description=${project.description}
>
> project.basedir=${project.basedir}
>
>
>
>
>
> I am getting an AntBuildException
>
>
>
> [INFO]
>
------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
>
> [INFO]
>
------------------------------------------------------------------------
>
> [INFO] An Ant BuildException has occured: Problem: failed to create
task
> or type echoproperties
>
> Cause: the class org.apache.tools.ant.taskdefs.optional.EchoProperties
> was not found.
>
> This looks like one of Ant's optional components.
>
> Action: Check that the appropriate optional JAR exists in
>
> -ANT_HOME\lib
>
> -the IDE Ant configuration dialogs
>
==////==
>
> Where do I configure the build classpath for Maven and Ant to find the
> Echoproperties optional task?
>
==////==
> Thanks very much
>
==////==
[Pilgrim, Peter]
--
Peter Pilgrim | E-Channel Services Technical Lead, Products & Markets
Lloyds TSB Bank plc, Corporate Markets, 10 Gresham Street, London, EC2V
7AE, UK
' +44 (0)207 158 6135 | ( +44 (0)1234 567 8901
+ [email protected]
: www.lloydstsbcorporatemarkets.com
This e-mail is private and confidential and may contain privileged material. If
you have received this e-mail in error, please notify the sender and delete it
immediately. You must not copy, distribute, disclose or use any of the
information in it or any attachments.
Lloyds TSB Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN.
Registered in England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered Office: Henry Duncan House, 120 George
Street, Edinburgh EH2 4LH. Registered in Scotland, number 95237. Telephone:
0131 225 4555.
Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4
3RL. Registered in England and Wales, number 2299428. Telephone: 01452 372372.
Cheltenham & Gloucester Savings is a division of Lloyds TSB Bank plc.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester plc
are authorised and regulated by the Financial Services Authority.
Lloyds Banking Group plc. Registered Office: Henry Duncan House, 120 George
Street, Edinburgh EH2 4LH. Registered in Scotland, number 95000. Telephone:
0131 225 4555.
Lloyds Banking Group plc is a signatory to the Banking Codes.
Telephone calls may be monitored or recorded.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]