Maven User List,
I waited in sending to this list until after I had exhausted my other
resources, including google searching, documentation, and experimentation of my
own.
As such, I hope that your collective minds can take on this challenge.
So here is the problem:
[INFO] task-segment: [com.cme.plugins:cme-packaging:cme-packaging]
(aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [cme-packaging:cme-packaging {execution: default-cli}]
cmepackage:
[echo] We are in UNIX
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to execute: Executing Ant script: package.build.xml [cmepackage]:
Failed to execute.
Could not create task or type of type: for.
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
- You have misspelt 'for'.
Fix: check your spelling.
- The task needs an external JAR file to execute
and this is not found at the right place in the classpath.
What is extremely interesting to me is the fact that it can use the task
definition for
Here is my declaration in my pom:
<build>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.5</version>
<!-- Add the Ant plugin tools -->
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-ant</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
I also placed a dependency on ant-contrib in my pom's dependencies section.
my build xml has this in it... as you can see, I was experimenting with
different methods of forcing it to find the items. I have nothing special in
mojos xml. Perhaps that is where my issue is?
<project name="processPackages" default="cmepackage" basedir="." >
<!--
<taskdef uri="antlib:net.sf.antcontrib"
resource="net/sf/antcontrib/antlib.xml"
classpath="path/to/ant-contrib.jar"/>
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" >
<classpath>
<pathelement
location="${settings.localRepository}/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar"
/>
</classpath>
</taskdef>
-->
<taskdef resource="net/sf/antcontrib/antlib.xml" >
<classpath refid="maven.plugin.classpath" />
</taskdef>
<target name="cmepackage">
<osfamily property="os.family" />
<if>
<equals arg1="${os.family}" arg2="unix" />
<then>
I had the most luck so far with
<taskdef resource="net/sf/antcontrib/antcontrib.properties" >
<classpath>
<pathelement
location="${user.home}/.m2/repository/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar"
/>
</classpath>
</taskdef>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]