The Ant script that runs maven-ant-plugin does not actually know Maven as such; This plugin is designed for backward compatibility with Ant user tasks. I can't think of a pure way to do what you want, although there may be some kind of hack that allows you to do this.
It should also be possible to run a second instance of Maven from within Ant, which fulfills the pure purpose of Cargo, but in this case you may run into problems with locked files, etc. The way to do this is to simply use the tag in your Ant script and invoke the mvn executable with the appropriate goals as arguments.
The cleanest way is to simply bind the Cargo target to the build phase and execute this run after Ant completes. I do not see a flaw in this approach - you have not actually indicated any specific reasons why you want to avoid this.
Pavel source share