简体   繁体   中英

ant error while compiling typedef A class needed by class IvyAntSettings cannot be found

I have an ant project with build.xml and ivy.xml setup.

when I run the "ant" command line or I use intellij to build the jar (with -compile) I am getting this error:

BUILD FAILED
build.xml : the following error occurred while executing this line:
jar:file:/C:/java/jdk1.8.0_351/jre/lib/ext/ivy-2.3.0.jar!/org/apache/ivy/ant/antlib.xml:21: type def A class needed by class org.apache.ivy.IvySettings cannot be found: org/apache/tools/types/DataType using the classloader AntClassLoader[]
...
Caused by: java.lang.NoClassDefFoundError: org/apache/tools/types/DataType

I tried ivy version 2.3.0, 2.4.0, 2.5.0, 2.5.1, ant version 1.10.5, 1.10.10, 1.10.12.

My ANT_ HOME and JAVA _*HOME are set properly and ANT_*HOME is in PATH

I can create run configuration and the service runs properly, I can access API/REST, no compile errors.

I am not sure what else to check

The problem is I had the jar files in multiple location. I removed it from the $ANT_HOME/lib/ant/lib folder and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM