I'm trying to launch:
ant rpm
command where my build.xml at line #126 looks like:
<rpm specFile="whatever.spec" topDir="${basedir}/rpm" command="-bb" failOnError="true" />
I'm getting the error:
build.xml:126: Problem: failed to create task or type rpm
Cause: the class org.apache.tools.ant.taskdefs.optional.Rpm was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-/usr/share/ant/lib
-/export/home/myuser/.ant/lib
-a directory added on the command line with the -lib argument
I downloaded ant-nodeps-1.7.1.jar which contains:
jar tvf ant-nodeps-1.7.1.jar | grep Rpm
7171 Fri Jun 27 05:03:48 CEST 2008 org/apache/tools/ant/taskdefs/optional/Rpm.class
I placed this jar file to directory: /usr/share/ant/lib
ant-1.7.0.jar -> ../../java/ant-1.7.0.jar
ant.jar -> ../../java/ant.jar
ant-launcher-1.7.0.jar -> ../../java/ant-launcher-1.7.0.jar
ant-launcher.jar -> ../../java/ant-launcher.jar
ant-nodeps-1.7.1.jar
but still getting that build error. I tried also with commands:
ant -lib /usr/share/ant/lib rpm
ant -lib /usr/share/ant/lib/ant-nodeps-1.7.1.jar rpm
ant -lib ant-nodeps-1.7.1.jar rpm
whithout succes, getting the same error. What is missing, what I need to do ?
Thanks !
cd into your ANT_HOME directory and run ant -f fetch.xml -Ddest=system
This will download the optional ant dependencies you need to ant rpm
.
This is from the ant install guide .
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.