
Building the Social Office Trunk using the Liferay IDE
Table of Contents [-]
Building the Social Office Trunk using the Liferay IDE #
This article covers building the Liferay Social Office Trunk using the Liferay IDE and a Trunk Build of Liferay Portal 6.1.0. This article assumes that Liferay 6.0 Development on Ubuntu Maverick 10.10 was used to setup the development environment.
/home/{username}/opt and /home/{username}/workspace will be the paths used for eclipse and its workspace
Liferay Portal 6.1.0 Trunk #
Switch the SVN Repositories Perspective in Eclipse.
- Expand:
svn://svn.liferay.com/repos/public/portal
- Right-click trunk and choose checkout
- Change the Project Name to liferay-portal-trunk and click Next
Compile Liferay Portal 6.1.0 Trunk #
- Create the directory /home/{username}/workspace/bundles/liferay-social-office-trunk on the system.
- Right-click liferay-portal-trunk in the Package Explorer and go to New > File
- Call the file app.server.{username}.properties
- Open the file and add the following to it:
## ##Server Directory ## app.server.parent.dir=/home/{username}/workspace/bundles/liferay-social-office-trunk
Build the initial Tomcat Bundle by doing the following:
- Go to Window > Show View > Other > Ant > Ant
- Drag the build-dist.xml file from the liferay-portal-trunk project to the new Ant view.
- Expand portal-dist in the Ant View and double-click unzip-tomcat
- Drag the build.xml file from the liferay-portal-trunk project to the Ant view.
- Expand portal and double-click all. This will compile the Liferay Portal Trunk and deploy it into the new bundle created above.
- Once the build finishes, you should have a very familiar looking bundle. The Server can then be used with the Liferay IDE as normal.==== Define Liferay Social Office Server in Eclipse ====
Create a new Liferay Server in eclipse by doing the following:
- Switch to the Liferay Perspective in Eclipse
- Click the Server tab
- Right-click in the Servers Pane and choose New > Server
- Select Liferay, Inc. > Liferay v6.0 Server (Tomcat 6)
- Click Add... on the Server runtime environment line with the following settings:
- Name: Social Office Trunk Server (Tomcat 6)
- Liferay Tomcat directory: /home/{username}/workspace/bundles/liferay-social-office-trunk/tomcat-6.0.29
Checking out Liferay Social Office Trunk components #
Social Office is made up of the following components:
- Hook Plugins
- so-hook
- Portlets
- chat-portlet
- contacts-portlet
- microblogs-portlet
- private-messaging-portlet
- so-portlet
- todays-events-portlet
- weather-portlet
- wysiwyg-portlet
- tasks-portlet
- Theme
- so-theme
These components reside in different parts of the Liferay Subversion Repository based on where they are in the development cycle. Some exist in the Plugins Trunk while others exist in Plugins Incubation
Method 1 in Liferay IDE Sharing Projects will be used in order to check the components out into the local workspace.
Checkout Components #
- Expand
svn://svn.liferay.com/repos/public/plugins/incubation/portlets
- Right-click contacts-portlet and choose checkout
- Leave the default project name of contacts-portlet and click Next
- Uncheck: Use default workspace location
- Browse to: /home/{username}/workspace/liferay-plugins-sdk/portlets
- Also check out the following components:
svn://svn.liferay.com/repos/public/plugins/trunk/hooks/so-hooksvn://svn.liferay.com/repos/public/plugins/trunk/portlets/tasks-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/microblogs-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/chat-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/private-messaging-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/so-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/todays-events-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/weather-portletsvn://svn.liferay.com/repos/public/plugins/trunk/portlets/wysiwyg-portletsvn://svn.liferay.com/repos/public/plugins/trunk/themes/so-theme
Fix and Convert Projects #
The projects will need have their Build Paths fixed as well as be converted to a Faceted project.
- Right-click chat-portlet and choose Properties
- Go to Java Build Path
- Go to the Projects tab and remove portal-trunk
- Go to the Libraries tab and remove all of the JAR files listed.
- Click Project Facets
- Click the link Convert to faceted form...
- Check Dynamic Web Module and change the version to 2.5
- Click the link Further configuration available... at the bottom of the screen
- Set the Content directory to: docroot and uncheck Generate web.xml
- Click OK to apply the settings
- Back in Liferay perspective, right-click chat-portlet once again and choose Liferay > Convert to Liferay plugin-in project
- Select Social Office Trunk Server (Tomcat 6) as the Liferay target runtime and click Finish
Follow the above steps for the remaining projects: contacts-portlet, mail-portlet, so-hook, so-portlet, tms-portlet, weather-portlet and wysiwyg-portlet.
Fix and Convert so-theme and todays-events-portlet projects #
so-theme doesn't have a Java Build Path because its not a Java project yet. Do the following steps to fix so-theme:
- Right-click so-theme and choose Properties
- Go to Project Facets
- Click the link Convert to faceted form...
- Check Dynamic Web Module and change the version to 2.5
- Check Java and make sure the version is 1.6
- Click the link Further configuration available... at the bottom of the screen
- Remove the src folder
- Set the Default output folder to: docroot/WEB-INF/classes and click Next
- Set the Content directory to: docroot and uncheck Generate web.xml
- Click OK to apply the settings
- Back in Liferay perspective, right-click so-theme once again and choose Liferay > Convert to Liferay plugin-in project
- Select Social Office Trunk Server (Tomcat 6) as the Liferay target runtime and click Finish
Follow the same steps to fix the todays-events-portlet project
Deploy Components #
Once everything is converted to a Liferay Project, drag and drop them on the Liferay Social Office Trunk Server.
Start the Liferay Social Office Trunk Server. Once the Server is started, right-click it and choose Liferay > Open Portal Home
If all goes well it should display Social Office. Sign on with the default username/password of admin/admin