Trying to run maven from ant using maven-ant-tasks-2.1.3.jar and it fails

2.2k Views Asked by At

As per the instructions from http://maven.apache.org/ant-tasks/installation.html, I downloaded the jar, added it to ANT_HOME/lib and ANT classpath, but it fails loading the classpath:

Error

Thanks in Advance.

2

There are 2 best solutions below

2
On

<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.4-SNAPSHOT.jar" /> <typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="maven-ant-tasks.classpath" />

Did the trick

0
On

You probably have an old Xerces JAR file in your CLASSPATH or in the Ant 'lib' directory, which doesn't match. I had the same issue with a very old project and I solved it by deleting that JAR file.