how to import some xyz.war file into the eclipse ide

4.2k Views Asked by At

Hello Stack overflow,

I am using liferay portal-6.0.0 version and I have a "greeting.war" file.

The WAR file deploys correctly, shows the portlet in Add Category and also after adding to the page display the output properly.

Now I wanted to get the code of that war file and want to import that code into the eclipse as a greeting-portlet (i.e as a liferay project).

so I hope some help from you.

Thank you.

1

There are 1 best solutions below

0
On

If the greeing.war has the embedded source code inside of it (WEB-INF/src) you can do the following:

  1. Install Liferay IDE plugins into Eclipse
  2. Download a 6.0.x Liferay Plugins SDK from here and extract the plugins SDK to a directory
  3. Add this SDK in your Liferay IDE preferences Window > Preferences > Liferay > Installed SDKs
  4. Download Liferay Portal tomcat bundle 6.0.6 if needed from here
  5. Unzip tomcat bundle
  6. Setup Liferay Portal Tomcat Runtime in Eclipse, File > New > Server > Liferay > Liferay Tomcat 6.0
  7. Rename greeting.war to greeting-portlet.war
  8. From Eclipse open the File > Import > Liferay > Liferay Binary Plugin
  9. Browse to the greetings-portlet.war file
  10. Select the 6.0.x SDK you configured
  11. Select the 6.0 target runtime you configured.
  12. Press Finish

The wizard will create a new portlet project in the SDK and then copy all of the WAR resources into the new project automatically.