Skip to main content

I want an IDE that manage his projects by using Ant !

Posted by vbrabant on November 22, 2003 at 9:56 AM PST

Ant is today the de facto standard to compile, test, deploy your application.

But, you are not developping with Ant, you are developping with an IDE

And when you write your project in the IDE, you can compile it, test it, debug it, deploy it.

And then, you want to put in place the daily build.

And therefore you have to build your ant build.xml file from scratch. Even if your IDE is already configured to compile, build jar, war, zip, docs, test reports, ...

Why are IDEs not using Ant to build the project ?

Then, you will have possibility to reuse what the IDE has automatically done for you.

Why not, have IDE where you can import an existing Ant project ?

That IDE would be able to create his internal structure of the project from the Ant Build.XML file.

I know that today, with NetBeans 3.5, you can compile your class by calling an Ant target. You can run your class by calling a Ant target.

Why is it very interresting ?

You are sure that the way your IDE is compiling, executing, testing your project on your local PC, is exactly the same way as the nightly build that run on the server.

But it's not yet sufficient.

Did you remember my preceding blog concerning freedom of codestyle?

Imagine now that when you use the action Commit in your IDE, it launch the target commit of your Ant file.

You can customize that target to

  1. execute jalopy,

  2. run checkstyle,
  3. run PMD,
  4. run somes metrics
  5. run somes JUNIT test
  6. and then
    • refuse to commit
    • or

    • accept to commit

    depending of the result of checkstyle, for example, or if junit tests are broken or if metrics are bad.

It means that you are sure that the code you commited in the repository is well-formated, has up to date javadoc, is following your standards, ...

It can only enhance the quality of code commited in the CVS repository.

That would be a nice enhancement, because, today, no versionning tools permits you to refuse commit depending of somes criteria.

By having all IDE using Ant build.xml file, you will be able to work in a team where everyone can choose his IDE. You will assure that commited code is compliant with your rules.

I am happy to learn that NetBeans 3.6 will enhance integration with Ant.

Related Topics >>