Hi,
The antrun-plugin by default only provides the core ant tasks. If you
need additional tasks you need to include the jar containing the add-on
tasks to the dependencies/ section of the plugin definition in your pom.
propertyfile is an optional ant task and is contained in
ant:ant-optional [1]. As you can see the newest version available in
central is 1.5.3-1 whereas the current antrun-plugin uses ant-1.6.5. I
don't know if the two versions are compatible. If not you either need to
create an upload-request for ant-optional:1.6.5 or install it in your
local repository.
-Tim
[1] http://repo1.maven.org/maven2/ant/ant-optional/
[EMAIL PROTECTED] schrieb:
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;
modelVersion4.0.0/modelVersion
groupIdcom.mycompany.mygroupid/groupId
artifactIdmyartifact/artifactId
packagingpom/packaging
version0.4.0-SNAPSHOT/version
nameMy maven and ant project/name
build
plugins
plugin
artifactIdmaven-antrun-plugin/artifactId
executions
execution
idinstallId/id
phaseinstall/phase
configuration
tasks
ant antfile=${basedir}/install.xml inheritRefs=true
target name=installTarget /
/ant
/tasks
/configuration
goals
goalrun/goal
/goals
/execution
/executions
/plugin
/plugins
/build
/project
=
=install.xml=
?xml version=1.0?
project name=myproject
tstamp
format property=install.date.time pattern=.MM.dd.HH.mm/
format property=install.year pattern=/
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]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]