Building and Deploying uPortal 3

Information on this page pertains to the uPortal 3 effort currently underway. This documentation does not apply to any version of uPortal 2 or the exploratory portal code archived in the SVN sandbox. For more information on this effort please read the uPortal 3 Development Documentation

Build Management

uPortal 3's primary build system is Maven 2. It is recommended that those wishing to build and deploy uPortal 3 have basic familiarity with Maven 2 which can be obtained from the Run Maven tutorial. Ant is also used to provide some convenience and custom tasks, again a basic familiarity with Ant is recommended.

Build Tool Requirements

  • Ant - Any version other than 1.7.0, there is a known bug with 1.7.0. As of September 2007 Ant 1.6.5 is recommended.
  • Maven 2 - The latest version.

Initial Build & Deploy

Edit copy build.properties.sample to build.properties and edit it to point to the Tomcat install that will be used. Run 'ant hsql' to start a HSQL database for the portal to use. Run 'ant initportal' which will compile and deploy uPortal and the included portlets, and initialize the database.

Portal Development

The 'deploy-war' Ant target is the most useful for doing framework or channel development. It will compile any changes to the uPortal source or web application and deploy the changes to Tomcat. The 'deploy-ear' Ant target can be used to re-deploy not only uPortal but all of the portlets and shared libraries that are used as well.

Targets & Goals

Ant targets and Maven goals that are commonly used during uPortal building, deployment, and development.

ant hsql

Starts a HSQL database that works with the default uPortal database configuration. This target does not return, to shutdown the database use ctrl+c.

ant initportal

This target will ERASE the uPortal database before initialization. DO NOT run this target against a production system or any other system that has database settings that need to be saved.

Builds uPortal and deploys it to the configured Tomcat instance. Initializes the portal database and deploys dependent portlets. Actually runs the targets: deploy-ear, db, pubchan, and i18n-db.

ant deploy-war

If necessary re-compiles the uPortal source and re-packages the uPortal WAR then deploys it to Tomcat. This is the fastest way to move changes in the uPortal code into Tomcat.

mvn clean

This Maven goal replaces the 'clean' Ant target from uPortal 2. It will remove all generated classes and resources in the project. This does not clean out the Tomcat directories like the uPortal 2 'clean' target did, this function is taken care of by the new WAR and EAR deployment mechanisms.

mvn test

This Maven goal replaces the runtests Ant target from uPortal 2. It will compile and run the unit tests in the project.

Troubleshooting