When I run ant on CentOS to build java project I receive an error:
Could not create task or type of type: replaceregexp
ant -diagnostics shows that optional tasks are not available. How I can install optional tasks for ant?
Ant is installed from CentOS package.
Check your installation by opening a command line and typing ant -version into the commend line. The system should find the command ant and show the version number of your installed Ant version.
Installing Apache Ant Ensure that the JAVA_HOME environment variable is set to the folder, where your JDK is installed. Unzip the zip file to a convenient location c:\folder by using Winzip, winRAR, 7-zip or similar tools. Create a new environment variable called ANT_HOME that points to the Ant installation folder.
Copy the /about. html file from the old version to the new version. Open it and change the date to the current date (update the copyright as needed), Update the version of Ant mentioned and update the link to the what's new for the current release. Copy all of the files from the .
Works for me:
yum install ant-nodeps
Run the following command, to download the jars associated with ANT's optional tasks:
ant -f $ANT_HOME/fetch.xml -Ddest=user -Dm2.url=http://repo1.maven.org/maven2
For a full explanation, see the ANT Manual documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With