Ant build failed to run while running the ant tasks in build.xml
. I got the following error in the console:
<
lib
directory in the root of your project and place the maven-ant-tasks.jar file inside it.build.xml
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />
The above steps solved my issue. Hope this is helpful to someone in the future.
Alternate solutions,
maven-ant-tasks.jar
file under the ANT_HOME/lib
folder to solve this issue.eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730\lib
In my case, i already had the maven-ant-taksk.jar into directory 'eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730\lib'.
I'm using eclipse, so what i needed was, go to Ant Runtime on menu Windows > Preferences > Ant > Runtime, select "Ant Home Entries"
, click on "Ant Home"
button e select the Ant home directory
'eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730\lib'
It worked!