[ http://jira.codehaus.org/browse/MANTRUN-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann closed MANTRUN-97. ------------------------------------ Assignee: Benjamin Bentmann Resolution: Not A Bug This looks like a simple misconfiguration. You will need to add {{ant-nodeps}} as a dependency of the plugin (not the project!). Please have a look at [Using tasks not included in Ant's default jar|http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html]. > can't execute optional ant tasks > -------------------------------- > > Key: MANTRUN-97 > URL: http://jira.codehaus.org/browse/MANTRUN-97 > Project: Maven 2.x Antrun Plugin > Issue Type: Bug > Affects Versions: 1.2 > Reporter: Haiko Emmel > Assignee: Benjamin Bentmann > Attachments: pom.xml > > > try to run an optional ant task produce following error message: > Scanning for projects... > project-execute > [#generate-resources] > [antrun:run] > Executing tasks > [echo] Hello World > [ERROR]The following mojo encountered an error while executing: > [ERROR]Group-Id: org.apache.maven.plugins > [ERROR]Artifact-Id: maven-antrun-plugin > [ERROR]Version: 1.2 > [ERROR]Mojo: run > [ERROR]brought in via: POM > [ERROR]While building project: > [ERROR]Group-Id: haiko > [ERROR]Artifact-Id: test > [ERROR]Version: 1.0-SNAPSHOT > [ERROR]From file: C:\Dokumente und Einstellungen\hemmel\Eigene > Dateien\Projects\test\pom.xml > [ERROR]Reason: An Ant BuildException has occured: Could not create task or > type of type: propertyfile. > [ERROR]Ant could not find the task or a class this task relies upon. > [ERROR]This is common and has a number of causes; the usual > [ERROR]solutions are to read the manual pages then download and > [ERROR]install needed JAR files, or fix the build file: > [ERROR] - You have misspelt 'propertyfile'. > [ERROR] Fix: check your spelling. > [ERROR] - The task needs an external JAR file to execute > [ERROR] and this is not found at the right place in the classpath. > [ERROR] Fix: check the documentation for dependencies. > [ERROR] Fix: declare the task. > [ERROR] - The task is an Ant optional task and the JAR file and/or libraries > [ERROR] implementing the functionality were not found at the time you > [ERROR] yourself built your installation of Ant from the Ant sources. > [ERROR] Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to > the > [ERROR] task and make sure it contains more than merely a > META-INF/MANIFEST.MF. > [ERROR] If all it contains is the manifest, then rebuild Ant with the > needed > [ERROR] libraries present in ${ant.home}/lib/optional/ , or alternatively, > [ERROR] download a pre-built release version from apache.org > [ERROR] - The build file was written for a later version of Ant > [ERROR] Fix: upgrade to at least the latest release version of Ant > [ERROR] - The task is not an Ant core or optional task > [ERROR] and needs to be declared using <taskdef>. > [ERROR] - You are attempting to use a task defined using > [ERROR] <presetdef> or <macrodef> but have spelt wrong or not > [ERROR] defined it at the point of use > [ERROR]Remember that for JAR files to be visible to Ant tasks implemented > [ERROR]in ANT_HOME/lib, the files must be in the same directory or on the > [ERROR]classpath > [ERROR]Please neither file bug reports on this problem, nor email the > [ERROR]Ant mailing lists, until all of these causes have been explored, > [ERROR]as this is not an Ant bug. > ------------------------------------------------------------------------ > For more information, run with the -e flag > ------------------------------------------------------------------------ > BUILD FAILED > ------------------------------------------------------------------------ > Total time: 1 second > Finished at: Wed Aug 20 13:07:42 CEST 2008 > Final Memory: 33M/78M > ------------------------------------------------------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira