Junky
Junky

Reputation: 360

Ant's optional tasks are not available on CentOS

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

Answers (4)

Saabu1210
Saabu1210

Reputation: 25

try yum list 'ant*' to see available ant packages.

In my case yum install ant-antlr.x86_64 worked.

Upvotes: 1

Asim Zaman
Asim Zaman

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

Junky
Junky

Reputation: 360

Works for me:

yum install ant-nodeps

Upvotes: 17

Mark O'Connor
Mark O'Connor

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

Related Questions