uPortal 3 Project Structure

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

Base Structure

uPortal 3 uses Maven 2 for build and dependency management. Reading Maven's Introduction to the Standard Directory Layout is recommended before starting work on uPortal code or files.

Project Modules

uPortal 3 is a multi-module project which divides unrelated sections of the framework files into their own sub-projects. The following modules exist in uPortal 3.

uportal-impl

This module contains all of the uPortal source code and classpath files that end up in the uPortal web application. The code and resources are packaged into a JAR that is included in WEB-INF/lib of the uPortal WAR.

uportal-war

This module contains all web-accessible resources such as images, css and JavaScript for portal themes. It also contains the XSL files for channels and the portal structure and theme transformations which are included in the web-application's classpath. The web-accessible files and classpath resources are packaged into a WAR that includes the uportal-impl JAR and its JAR dependencies.

uportal-pluto-support

uPortal uses a custom dispatcher Servlet for Portlets it renders. Since all Portlets need access to this Servlet class it is packaged in its own module. The JAR that is generated is included by the uportal-ear module.

uportal-ear

With multiple WARs being packaged together for the portlets that uPortal ships with and JARs that are shared by all WARs the Enterprise Application aRchive (EAR) packaging makes sense for uPortal. This module does not contain any source or resources but the pom declares the uPortal WAR, portlet WARs and shared JARs as dependencies. This results in a single archive that contains uPortal an all needed portlets and libraries. A custom deployment tool which can deploy this EAR to Tomcat is included in the project.

uportal-ear-deployer

This module contains a utility for deploying EAR files to Tomcat. It is not included in the uPortal web application and is only a build-time utility package.

uportal-ant-tasks

This module contains custom Ant tasks that are used by the build.xml for the project. It is not included in the uPortal web application is only a build-time utility.

Dependency Management

Maven 2 is used for dependency management. Reading Maven's Introduction to the Dependency Mechanism is recommended before editing dependencies in the uPortal 3 project.

uportal-impl

Compile and runtime dependencies declared here will eventually be included in the uportal-war artifact. Dependencies that need to be placed in a shared classloader, such as Pluto, should be declared as provided here and then declared as compile in the uportal-ear module.

uportal-war

Direct and transitive compile and runtime dependencies are included in WEB-INF/lib of the WAR artifact. The WAR declares a dependency on the uportal-impl artifact and a few other artifacts that aren't needed by the uPortal source but are needed by code in the uportal-war module.

uportal-ear

Web-applications and shared library dependencies are declared here. The primary WAR dependency is the uportal-war artifact. The rest of the WAR dependencies are Portlet applications that are deployed with uPortal. The library (JAR) dependencies are shared libraries such as Pluto and common libraries such as the JDBC driver(s) for JNDI data sources.

Configuration Files

properties Directory

Resides at 'uportal-impl/src/main/resources/properties' and is packaged into the uportal-impl JAR. Contains all uPortal specific configuration files.

Logging

Runtime logging is configured in uportal-war/src/main/resources/log4j.properties.
Test logging is configured in the src/test/resources/log4j.properties file for each sub-project.

web.xml & portlet.xml

The web descriptors are in the uportal-war/src/main/webapp/WEB-INF/ directory along with other webapp related configuration files.

Tomcat 5.5 context configuration

The Tomcat context configuration resides in uportal-war/src/main/webapp/META-INF/context.xml This file contains JNDI datasource configuration.