ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Van <>
Subject Re: Command-Line execution of a third-party task
Date Sat, 24 Mar 2012 02:06:38 GMT

Thats great!  I was trying to find a way to programmatically kick off an 
ant-build anyway. Doing it from the command-line was just a stepping stone. 
This will allow me to write an "AntInvoker" class for my projects that use
ant builds in the same was as I have a MavenBuildInvoker that uses the
mavenInvoker library.  Now to write the same thing for ivy and grails!  :-)

Thanks folks for all of your help, it is greatly a deeply appreciated.

Oh, and for you folks that were wondering, I help run an enterprise software
development organization with about 30 projects and > 60 different
applications.  Each application needs to have four seperate sonar builds:
development, project-level integration, enterprise-level integration, and
production. So, if you do the math, that over 250 seperate builds. Each
project may use their own build environment, and what  I don't want my folks
doing is getting into the business of modifying the build.xml files for each
project that has chosen to use Ant. So, running from the command-line
without modifying the build files was a good approach. Because I could
easily pop that into Jenkins to manage my sonar analysis.

However, after thinking about it a second time, Jenkins wasn't really the
best place to do this because I would have needed to add 250+ new builds to
the over 60 that existed. Running >300 builds through jenkins would have
been unwieldy.

So, I wrote a tool called the Sonar Code Quality Manager (SonarCQM), which
will probably be donated to sonarsource later on this year.  That tool scans
a "conf" directory. In that directory, for each build Sonar is doing, there
is one configuration file with SVN checkout information,
maven/ivy/ant/grails build information, and of course the name of the build
tool being used. The tool also has a "workspace" directory into which a
fresh copy of each build's code is checked out into, and then the tool
"invokes" the build tool indicated in the .conf file.  That build uses the
sonar plugin/task/whatever to generate the sonar stats.  I just completed
the subversion and maven invokers. Now that I have the information on how to
programmatically kick off an ant build, I'm stoked, cuz my job is nearly

Anyhow, thanks again!

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message