Reputation: 360
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.
Upvotes: 7
Views: 6366
Reputation: 25
try yum list 'ant*' to see available ant packages.
In my case yum install ant-antlr.x86_64 worked.
Upvotes: 1
Reputation: 21
yum install ant-apache-regexp
It will install the required optional task (jar).
yum search ant
One can do a quick search to get a list of other ant related packages.
Upvotes: 2
Reputation: 77951
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.
Upvotes: 2