Maven2 Ant Plugin cannot be found

If you use Maven 2, and have been trying to use the Maven 2 Ant plugin (“mvn ant:ant“), you may have been getting the following error:

The plugin 'org.apache.maven.plugins:maven-ant-plugin' does not exist or no valid version could be found

A quick check, however, at the Maven 2 Plugin Repository shows that the maven-ant-plugin is right there. However, the latest published version is version 2.0 and for some strange reason (at least on my end) Maven doesn’t pick it up.

There is a workaround. Apparently, you can specify the full plug-in groupId, artifactId and version as mentioned in here in the maven-users mailing list. So you could go:

mvn org.apache.maven.plugins:maven-ant-plugin:2.0:ant

Better yet, simply configure the plugin through in your project’s pom.xml:


(Note that the plugin groupId, when not specified, defaults to org.apache.maven.plugins which is correct, in this case.)

That should let you do mvn ant:ant again any time!

One thought on “Maven2 Ant Plugin cannot be found

  1. Hi Alistair, I stumbled upon your blog and I’m glad that you’re using Maven. If you find yourself in a bind on Maven stuff please feel free to get in touch with the Exist guys. BTW, I’d like to discuss with you re some RUG activities we have in mind. Please drop me an email. ttyl.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s