There are several core modules for creating jar libraries, EJBs, webapps and ear files:
|lib.xml||For creating standard java jar file projects.|
|ejb.xml||For creating EJB modules.|
|webapp.xml||For creating web applications.|
|ear.xml||For packaging complex J2EE applications.|
Your build file should only import one of these, depending upon the intended distribution type. Ideally core modules produce a single distribution file. You should break your project into modules along the lines of the core modules target types (jar, war, ejb, ear). Standard targets are defined near the top of the core module and serve as templates when overriding targets. The most common standard target names in core modules are: setup, gen, compile, dist, repo, clean.