Saturday, August 1, 2009

Rebuilding an application EAR-File

Sometimes its nessesary to extract an application and to (re)-build an EAR-File which can be deployed on another Application Server.
Tools needed: Eclipse WTP

1. Copy the application-folder to your local harddrive
2. Start Eclipse WTP and create an new project
2.1 Select File > New > Project... > Dynamic Web Project
2.2 Enter a project name
2.3 Select "Add project to an EAR" and click "New"
2.4 Enter a project EAR name (e.g. "original project name (2.2) + ear)
2.5 Click "Finish" in EAR-Window
2.6 Click "Finish" in Project-Window
3. Add the application files to the project
3.1 Drag an drop the files located in the WAR-folder of the application to folder "Webcontent" in the project.
3.2 The project should now look like this4. Build EAR-File
4.1 Right-Click Project > Export > Export... > EAR-File
4.2 Select destination of the EAR-File and Click "Finish"