Building and Deploying portlets
Building portlets for YaleInfo depends on two factors:
- Is the project an Ant project?
- Is the project a Maven project?
Deploying portlets for YaleInfo depends on a few factors:
- Is the project a true JSR-168 portlet?
- Is the project just a servlet application?
- Are you deploying locally or are you deploying to a server environment?
Building Ant projects
We will be converting all Ant projects to Maven 2 projects in due time.
- Edit the build.properties of the project and fill the corresponding values for the appropriate environment.
- Run the dist target
Building Maven projects
- Refer to Running Maven 2 goals for different environments
- Ensure that the correct properties are set in src/main/filters/filter-environmentname.properties
- Run mvn package -P 'ENVIRONMENT NAME'
Deploying JSR-168 portlets for local environments
- Ensure the build.properties file of your checked our YaleInfo project has the correct values, mainly the correct location of your tomcat instance.
- From your YaleInfo directory run ant deployPortletApp -DportletApp=/path/to/portlet.war
Deploying JSR-168 portlets for a server environment
this could definitely be improved; looking to use pluto plugin for Maven projects
- Follow the same steps as "Deploying JSR-168 portlets for local environments"
- Locate the deployed portlet in the tomcat webapps directory and jar it's contents by running jar cfM PortletName.war PortletDir/
- Drop the war in the webapps directory of the main portal instance (portal1)
Deploying non JSR-168 "portlets" for local and server environments
- Either drop the war in the webapps directory of the secondary portal instance (portal2) or use the Tomcat manager to upload and deploy.
Server Deployment Additional Instructions
- Run portlet package build
- Delete old portlet directory from local tomcat instance
- Run ant deployportletapp target for portlet
- create war file jar cfM <PortletName>.war *
- Upload war file to home directory. Create directory structure deployment/env (dev, test, prod)/portal/<current> or <old>
- cd /usr/local/tomcat_instances/portal instance (portaldev, portaltest, etc)/webapps
- sudo -u <portal instance> (portaldev, portal, etc) -s
- remove old war file and wait for tomcat to remove the app
- copy new war file to webapps directory and wait for tomcat to deploy app
- exit
- sudo /etc/init.d/<portal instance> stop
- sudo /etc/init.d/<portal instance> start
- register portlet in portal if not already registered.
- check the logs in tomcat logs portal instance directory for worklist portlet and run a test. (less < log file name>)
Labels
(None)