I am using Liferay Developer Studio Version: 2.2.2.201504240205-ga3a, and I have an existing Liferay project that is made up of multiple portlets. I have the SDK installed, and I have deployed some test portlets (with Maven/Ant). How do I create 1 war file that deploys the portlets correctly?
0
votes
2 Answers
1
votes
If your existing project is an SDK project (e.g. utilizes Ant), it's probably contained in an SDK folder. Use "Window/Preferences/Liferay/Installed Plugin SDKs" to make this SDK known to Liferay. Then just use "File/Import/Liferay Projects from Plugins SDK" to import your project.
If it's a maven plugin try if it's "File/Import/Liferay Project from existing source" or just a plain import of a maven project.
0
votes
You can also download the plugins(which has many plugins and examples) source code, stick the code in the plugins folder of the source. This will make the parent in the ant task the sdk, then import the project, so your projects folder will be next to other plugins.
/Liferays/plugins-src/liferay-plugins-6.2.0-ga1/portlets$ ls -la
total 408
drwxr-xr-x 96 jimmy jimmy 4096 Nov 2 16:00 .
drwxr-xr-x 14 jimmy jimmy 4096 May 23 2014 ..
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 akismet-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 ams-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 analog-clock-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 bible-gateway-portlet
-rw-r--r-- 1 jimmy jimmy 730 Nov 1 2013 build-common-portlet.xml
-rw-r--r-- 1 jimmy jimmy 8926 Nov 1 2013 build.xml
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 calendar-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 chat-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 chat-video-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 contacts-portlet
-rw-r--r-- 1 jimmy jimmy 922 Nov 1 2013 create.bat
-rwxr-xr-x 1 jimmy jimmy 778 Nov 1 2013 create.sh
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 ddl-form-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 events-display-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 flash-portlet
drwxr-xr-x 4 jimmy jimmy 4096 May 23 2014 google-adsense-portlet
place the folder that contains the code here.