From any perspective, click
File > New > Other > J2EE > Enterprise Application Project
Enter the Name 'EARProject', then click Next.
You can configure Facets here and bind to the runtime.
Click Next on New EAR Application wizard. The
add modules to EAR page allows existing workpace
modules to be added to the new EAR module. In this
case there aren't any. Application Client, EJB,
Connector, and Web modules may be created by
clicking the 'New Module...' button. In this case,
however, simply click the finish buutton to create
the EAR Module without creating any other J2EE
modules or adding any exiting modules to the EAR.
After the wizard finishes, if you are not already in
the J2EE perspective, you will be prompted to switch
agree by selecting 'Yes'. In the J2EE perspective
you will see the EARProject in the Project Explorer.
Next create the following J2EE Projects. Be sure to
add each module to the EAR module created above. Otherwise, choose
the defaults (except for the Web Module, whose
default is not to be added to an EAR).
|J2EE Application Client Module
|Dynamic Web Module
Here is an example for the first one:
Now, you should see the modules represented under in the Project Explorer
Create another EAR Project ('AnotherEAR'), except this time
include all the modules on the second page of the new EAR Module
All the seleted modules should be added to the EAR
when finishing the wizard. Verify this by checking
the application.xml in the new EAR Module.
Now create another EAR Module ('YetAnotherEAR'),
except this time click the 'New Module...' button on
the second page of the Wizard.
Create some new modules from this page.
The second page of the new EAR Module Wizard should
only display J2EE modules which can be added the the
new Application. For example, if creating a J2EE 1.3
Application, then only 1.3 compliant Modules should
be displayed in this list. Ensure this is working
properly by creating multiple Modules with multiple