Exporting an enterprise application into an EAR file

Enterprise applications are deployed in the form of an EAR file. Use the Export wizard to export an enterprise application project into an EAR file for deployment.

This process for exporting to an EAR file is not meant to be a project sharing mechanism. If you want to share projects, see Sharing projects using Project Interchange.

To export an enterprise application project into an EAR file:

  1. In the Project Explorer view of the J2EE perspective, right-click the project that you want to export.

  2. Select Export > EAR file from the pop-up menu. The Export wizard opens.

  3. In the Destination field, enter the full path and EAR file name where you want to export the enterprise application project that is selected in the EAR project field.

  4. Optional: To export source files, select the Export source files check box.

  5. Optional: If you are exporting to an existing EAR file and you do not want to be warned about overwriting it, select Overwrite existing files without warning

  6. Optional: Select Include project build paths and meta-data files. This allows you to preserve the original names of projects included in or referenced by the application project, for re-importing the EAR in another workspace.

    If you are developing large EAR files with multiple modules, this option could enhance the performance of your development process. When the modules are imported, they are optimized as binary projects. You can then replace one or more binary projects with a project from your repository for continued development and testing. This allows you to keep a few source projects in your workspace, thus optimizing the performance of your workbench.

  7. Click Finish.

The wizard exports the contents of the EAR project to the specified EAR file. Additionally, for each project that corresponds to a module or utility JAR in the application, the project contents are exported into a nested module or JAR file in the EAR file. If any unsaved changes exist on any of the files in any of the referenced projects, you are prompted to save these files prior to export.

 

Related concepts

J2EE architecture
Enterprise application projects
Application Deployment Descriptor editor

 

Related tasks

Creating an enterprise application project
Importing an enterprise application EAR file
Sharing projects using Project Interchange