tags:

views:

134

answers:

4

What i mean exactly is that build.xml that actually included those plugins like findbugs etc. Or nicely done build.xml

A: 

You could use maven 2, because it has built-in plugin support.And all the stuff like: PMD, Findbugs, Checkstyle etc , could be integrated automatically . If you have some existing code it could be called from maven you could use maven-antrun-plugin.

Pavel Rodionov
A: 

I created the project Antiplate to create a build-template for typical Java-projects. You can look into it's template-dir for some solutions for typical problems. Findbugs isn't included (yet), but PMD, Checkstyle, Emma and some other stuff. It's splitted over different files, so the ant-code should be understandable.

The main stuff can be found in the .xml-files in this directory. This is a link directly in the SVN of Antiplate, that shows the content of the imported .xml-files, that contain all the tasks. The file doc.xml contains the generation of the reports with emma, cpd, checkstyle etc. I hope the links directly in the source help to understand how to implement such task yourself.

Mnementh
That site is really confusing - why not just show the code instead of a 25 Mb download bundle?
amarillion
You're right. I edited my answer and added links into the SVN, directly to the interesting stuff.
Mnementh
A: 

I know this is not exactly what you asked for. But if you want to use ant, you'll need to read this piece: Ant in anger.

Yes: I know you just want some hack'n'slash examples; read the piece

Yes: I know you just want your problem solved; read the piece

Once an ant file reach beyond a certain threshold, it'll cease being nice. And nice examples will ever be to small to get you anywhere interesting. So just stop trying to copy paste eleven lines of arbitrary xml and;... yeah, I think you got it by now ;)

Steen
+1  A: 

A great resource for sample Ant build files is Coogle code search. Search Google Code for build.xml. Once you search, narrow it down to "Project Hosting" to get the real meat. You will find dozens of examples of real, working, usable build.xml files.

For example, here's the build file for Firebug, the build file for the Clojure language, the build file for GWT and the build file for Google Guice.

Of course, there are other fine repositories of source code, here is a Google search of SourceForge.net for build.xml files and a Google search of RIAForge.org for build.xml files

Another good way to find quality build files is a Google search for build.xml in the URL, which will result with a good variety. Add to that query an aspect or programming language of choice, and you will have what you need in no time.

Nathan Strutz