You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Pilgrim, Peter" <pe...@lloydsbanking.com> on 2009/08/17 14:28:18 UTC

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

 

Do not panic, this is a common problem.

The commonest cause is a missing JAR.

 

This is not a bug; it is a configuration problem

 

 

[INFO]
------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 1 second

[INFO] Finished at: Mon Aug 17 13:26:00 BST 2009

[INFO] Final Memory: 6M/12M

[INFO]
------------------------------------------------------------------------

 

 

Where do I configure the build classpath for Maven and Ant to find the
Echoproperties optional task?

 

 

Thanks very much

 

-- 

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

* peter.pilgrim@lloydstsb.co.uk

* www.lloydstsbcorporatemarkets.com
<http://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 
______________________________________________________________________

RE: [SOLVED] Maven 2 Antrun Echoproperties

Posted by "Pilgrim, Peter" <pe...@lloydsbanking.com>.
 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:peter.pilgrim@lloydsbanking.com]
> 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
+ peter.pilgrim@lloydstsb.co.uk
: 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org