Notes on WAR/EJB-JAR/EAR File Creation
In the workbench, WAR/EJB-JAR/EAR files are not created at build time. Use the Export wizard to create WAR/EJB-JAR/EAR files. If "B.6 Automatic Update of the Workspace and Projects" is performed on a V10 Compatible Workbench project, the J2EE package builder for creating WAR/EJB-JAR/EAR files is deleted. Instead, the ANT script file for creating these archive files is created in the project.
Archive File Type to be Generated | ANT Script File |
---|---|
WAR file | buildWAR.xml |
EJB-JAR file | buildEJB-JAR.xml |
EAR file | buildEAR.xml |
Point
When buildEAR.xml, the ANT script file for creating EAR files, is executed, it must be executed using the same JRE as the workspace. To do that, follow the procedure below:
Select the buildEAR.xml file, then from the context menu, select [Run As] > [Ant Build...]. The [Edit Configuration] dialog box is opened.
Click the [JRE] tab, and open the JRE page.
Select [Run in the same JRE as the workspace].
Click [Apply].
To create WAR/EJB-JAR/EAR files at build time, add an ANT script file for creating these archive files to the builder. This procedure is shown below.
Display the Project Properties.
In the left pane of the Project Properties window, select [Builders]. The builder page is displayed.
In the right pane of the builder page, click the [New] button. The [Choose configuration type] dialog box is displayed.
In the [Choose Configuration type] dialog box, select [Ant Builder] from the list, then click [OK]. The [Edit Configuration] dialog box is opened.
In [Name], enter the name of this process.
In the [Main] tab, click the [Browse Workspace] button of [Buildfile]. The [Choose Location] dialog box is displayed.
In the [Choose Location] dialog box, select the ANT script file for creating archive files, then click [OK].
If creating EAR files, make settings to execute the ANT script file using the same JRE as the workspace. In the [JRE] tab, select [Run in the same JRE as the workspace].
Click [OK]. Return to the Project Properties window.
Make sure that the added item is the last one in the builder. If it is not, then use the [Up] and [Down] buttons to move the item to the last position in the builder.
Note
Even if an ANT script file is executed to create or update an archive file, resources are not updated on the workbench. To reflect resource modifications in the workbench, from the context menu, select [Refresh], and so on.
Information
EAR files are not created directly using the buildEAR.xml ANT script file for creating EAR files. The EAR file is actually created by the buildEAR2.xml ANT script file. The buildEAR.xml ANT script file updates buildEAR2.xml to match the project structure, and invokes buildEAR2.xml. If there is no modification to the project structure, a buildEAR.xml need not be invoked. EAR files can be created by simply executing buildEAR2.xml.
The IJServer launch configuration provided in the V10 Compatible Workbench is no longer provided.
The workbench in this version provides the "Interstage Application Server" launch configuration. However, if executing a Web application as a client application, in the Servers view, by selecting the deploying Web application project, then from the context menu, selecting [Web browser] the Web browser is started, and the Web application can be executed.