Nice JDev 11g Feature: EAR Packaging

While working on the samples for JDeveloper hands-on workshops and on the ADF in Action series, I stumbled into this nice feature...

EAR Packaging with JDeveloper 11g

In previous releases of JDeveloper a number of different strategies have been used to ensure a proper EAR file packaging. Very common is the usage of Ant or Maven scripts, because these are useful for daily builds.

Background

The JDeveloper IDE has the concept of Applications and Projects, if we translate Application to Enterprise Application and Project to Module, we are right in the Java EE nomenclature and can easily understand how to create an Enterprise Application Archive (EAR) with modules like Web Application (WAR), Enterprise JavaBeans (EJB JAR) and so on. With this background information we are able to locate the necessary deployment profiles for each part of the final application.

Each project has its own deployment profile, eg WAR file for a web application or JAR file for a library project. But if you want to put everything together, where do find it?

The Application Deployment Profile

Exactly, the application itself will hold the deployment profile for the EAR file. To find it we need to go to the Application Properties. Application Properties? Where are they? They are located at the Application Level:

  1. Open the Application Navigator
  2. The topmost element is a drop down box with the names of the applications in your IDE. Right next to the drop down box you find the application menu. Click on it and open the Menu. There, at the end of the menu you will find the entry Application Properties! Select it and you will open the Application Properties window.
  3. Select the Deployment entry to go to the Deployment Profiles overview. On the first time it is empty.
  4. To create a deployment profile, you must click on the New... button. The Create Deployment Profile window appears and you can select the Archive Type. On this level only the type EAR File is avaiblable and useful.
  5. Give the profile a Name and click OK.
  6. Once created you are able to edit the EAR Profile Properties.

Edit the Appliction Deployment Profile

The Edit EAR Deployment Profile Properties window allows you to edit the Application Assembly, ie. which modules, er project results, are part of your EAR file, or the Filter Groups.

Bonus: Locate and Edit the Application Deployment Descriptors

To locate and edit the Application Deployment Descriptors you have to expand the Application Resources accordion in the Application Navigator. The Descriptors group contains all the deployment descriptors used at the EAR level. If you want to add a Java EE or product specific deployment descriptor click on META-INF and open the Context Menu. It will contain the three entries New JEE Deployment Descriptor, New Oracle Deployment Descriptor and New Weblogic Deployment Descriptor. All three open a window to select the specific deployment descriptors from.

Enjoy.

 


Comments:

Post a Comment:
Comments are closed for this entry.
About

This is my blog for things I found useful during my work as Senior Solution Architect for Identity Management and Service-oriented Architecture at Oracle. All text expressed on this blog is my own opinion and not related to my employer.

Search

Top Tags
Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today