git4ruby/sample-java-project
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This is just a reference for setting up a new Java project. It contains some of the little Ant tricks I've learned. You will need to have Astyle installed and in your path for the "format" target to work. If it's missing, that's fine. It won't affect any other targets. Ant will be looking for Checkstyle, which provides the "check" target. Except the extra target, I think it should work without it. Like a hardcore bureaucrat, Checkstyle will harshly criticize your code, requiring you to add every bit of excessive and needless boilerplate. That can keep some idle hands pretty busy. Ant will be looking for ProGuard, which provides the "optimize" target. You should still be able to build the project without it. Only the "optimize" target will not work. Note that ProGuard and Checkstyle are needed only in the build classpath, not your project's classpath. That means you probably don't want them in lib/. They need to be where Ant can get to them -- such as Ant's lib/. I hate coding absolute paths in my build script and I hate including built files as part of the base project. My philosophy is that the *environment* should be set up so that the tool can easily find the external resources they need (JUnit, etc.) from the system, not within the project. It's the system that provides the libraries. Anyone who has the proper development environment set up -- one that carries across many projects -- should be able to clone the repository and do the build without editing anything or installing anything else into the project space.