I've found that when using the maven-antrun-plugin, there are certain
ant tasks that are unknown and cannot be used. I've looked for needed
jars, but not found them. I've looked for, but not found references to
this problem. Here is are a pom and ant file that illustrate the
problem. I would like to know how to fix this. There are other tasks
that do not work and several "builtin" properties that are undefined.
I've just used <propertyfile> as an example.
Running "ant -f install.xml installTarget" succeeds and creates two
files in the basedir.
Running "mvn install" fails
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks
Embedded error: The following error occurred while executing this line:
C:\Temp\install.xml:26: Could not create task or type of type: propertyfile.
Ant could not find the task or a class this task relies upon.
I'm using maven 2.0.5 and ant ant 1.6.2.
Any help would be appreciated.
Thanks!
--the walrus
=====pom.xml=====
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.mygroupid</groupId>
<artifactId>myartifact</artifactId>
<packaging>pom</packaging>
<version>0.4.0-SNAPSHOT</version>
<name>My maven and ant project</name>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>installId</id>
<phase>install</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/install.xml" inheritRefs="true">
<target name="installTarget" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
=================
=====install.xml=====
<?xml version="1.0"?>
<project name="myproject">
<tstamp>
<format property="install.date.time" pattern="yyyy.MM.dd.HH.mm"/>
<format property="install.year" pattern="yyyy"/>
<format property="install.month" pattern="MM"/>
<format property="install.day" pattern="dd"/>
<format property="install.hour" pattern="HH"/>
<format property="install.minute" pattern="mm"/>
</tstamp>
<target name="installTarget">
<echo message="Running installTarget"/>
<!-- workaround -->
<echo file="${basedir}/install_echo.properties"># my comment
install.date.time=${install.date.time}
install.year=${install.year}
install.month=${install.month}
install.day=${install.day}
install.hour=${install.hour}
install.minute=${install.minute}
</echo>
<propertyfile file="${basedir}/install.properties">
<entry key="install.date.time" value="${install.date.time}"/>
<entry key="install.year" value="${install.year}"/>
<entry key="install.month" value="${install.month}"/>
<entry key="install.day" value="${install.day}"/>
<entry key="install.hour" value="${install.hour}"/>
<entry key="install.minute" value="${install.minute}"/>
</propertyfile>
<echo message="Finished installTarget"/>
</target>
</project>
==========
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]