K.6. EAR Files

The abuild.application-xml property has to be set in Abuild-ant.properties in addition to the abuild.ear-name property in order for an EAR to be created.

Suppose you wanted to avoid inclusion of just the jar-example.jar file from the EAR file. You can do this by creating a local pre-package hook that removes it from the classpath directory. This same mechanism can be used to create hybrid client/server WAR files. The main problem with this approach is that it requires you to know the name of the archives you want to move or remove, though this is not as bad as knowing their locations. A comparable alternative would be to define custom interface variables in your dependencies to name the actual archives. These interface variables would be available as ant properties from your local build file.

As with a JAR file, anything in the src/conf directory will appear under src/META-INF, and anything in src/resources will appear in the EAR file relative to its location in src/resources.