19.3. Directory Structure for Java Builds

Abuild's Groovy backend provides a default directory structure that it uses by convention when performing Java builds. It is possible to override all of these paths by setting specific parameters as described in Section 19.6, “Advanced Customization of Java Rules”. In this section, we just provide a quick overview of the default paths.

All paths are relative to the build item directory. Note that abuild-java is the abuild output directory for Java builds. All directories under abuild-java are created automatically if needed. All other directories are optional: abuild will use them if they exist but will not complain if they are missing. Note that the clean target removes the entire abuild output directory.

Table 19.1. Default Java Directory Structure

DirectoryPurpose
src 
—/java hand-coded Java sources
—/resources hand-created additional files to be packaged into the root of the item's JAR or EAR files or into the WEB-INF/classes directories of the item's WAR files
—/conf not used directly by abuild; a good place to put other configuration files such as application.xml, that are referenced by specific parameters
—/—/META-INF hand-created files to go into the item's archives' META-INF directories
—/web 
—/—/content hand-created content to go into the root of the item's WAR files
—/—/WEB-INF hand-created content to go into the item's WAR files' WEB-INF directories
abuild-java the abuild output directory; all contents below here are generated
—/src 
—/—/java generated Java sources; treated identically to src/java
—/—/resources generated additional files; treated identically to src/resources
—/—/conf not used directly by abuild; a good place to put generated versions of whatever you would put in src/conf
—/—/—/META-INF generated META-INF files; treated identically to src/conf/META-INF
—/—/web 
—/—/—/content generated web content; treated identically to src/web/content
—/—/—/WEB-INF generated WEB-INF; treated identically to src/web/WEB-INF
—/dist the location where abuild places generated archives
—/doc the location where abuild places Javadoc documentation
—/junit the location where abuild writes JUnit test results
—/—/html the location where abuild writes HTML reports generated from JUnit test results