•  
Main
About Hippo Portal
Documentation
Community
Other

Hippo Portal Maven-1 plugin

The Hippo Portal Maven-1 plugin was created to perform common configuration, build and deploy operations. There are two installation methods: downloading and installing the plugin with Maven (preferred method), or building the plugin from the source code, and installing it on your local machine. Use the latter only if you need features only available in the development version.

Jetspeed-2 plugin required

As the Hippo Portal plugin depends on the Jetspeed-2 plugin for Maven-1, make sure this j2 plugin is installed. If not, install it using:

maven plugin:download -DartifactId=maven-jetspeed2-plugin -DgroupId=org.apache.portals.jetspeed-2 -Dversion=2.1.3

Installation using Maven

The version of the plugin to be used should match the version of Hippo Portal that's being used. If you start a new project, take the latest version of the plugin. Check the Hippo public Maven repository to determine which version to take (as of this writing the latest version is 1.07.01).
To install the hippo portal maven plugin, type the following line in your console:

maven plugin:download -DartifactId=hippo-portal-maven-plugin -DgroupId=nl.hippo.portal -Dversion=1.07.01

Installation from source

If you need features of the Hippo Portal Maven plugin, which are only available in the development version of the plugin (trunk), then you can also build the plugin from the source. Download Subversion , then execute the following command from the console:

svn co http://svn.hippocms.org/repos/hippo/hippo-portal/trunk/hippo-portal-maven-plugin

or , if you use Eclipse, you can use the Subclipse plugin for Eclipse to checkout the Hippo Portal Maven plugin.

After you checked out the source, go to the root folder of the plugin codebase, and execute:

maven deploy-plugin

That will build the plugin and install it as a Maven plugin on your local machine.

Goals

To see which goals the plugin contains, type the following command:

maven -P hp

The goals are explained in more detail in the following sections.

hp:create-portal-project

Creates the minimal content for a new Hippo Portal project in the current folder. The following things are generated:

  • Hippo Portal + Jetspeed Spring configuration
  • Maven dependencies for core components like Hippo Portal, Hippo Repository API, Jetspeed, etc.
  • Build and run-time properties
  • a minimal setup for Jetspeed pages, templates and decorations

hp:create-pa-project

Creates the minimal content for a new Portlet Application project, based on Hippo Portal, in the current folder. The following things are generated:

  • Hippo Portal + Jetspeed Spring configuration
  • Maven dependencies for core components like Hippo Portal, Hippo Repository API, Jetspeed, etc.
  • Build and run-time properties
  • a minimal setup for Jetspeed pages, templates and decorations

hp:build-portal

Builds the portal and creates a WAR that can be deployed to an application server.

hp:deploy-portal

Deploys the portal to the filesystem location specified by the build property nl.hippo.portal.server.home. Usually this is the root folder of an application server (like Tomcat), but it can also be an empty folder which is zipped and distributed to a remote server. The deployment will copy:

  • Hippo Portal Spring configuration (from <source dir>/src/conf to <target dir>/conf)
  • Shared libraries. Several .jar files are copied from your local Maven repository to <target dir>/shared/lib)
  • Your custom Portal .war and the Hippo Portal web application (<target dir>/webapps/*)

hp:init-portal-db

Initializes the portal database. Make sure the following build properties are configured:

nl.hippo.portal.database.default.name
nl.hippo.portal.database.url
nl.hippo.portal.database.driver 
nl.hippo.portal.database.user 
nl.hippo.portal.database.password 

nl.hippo.portal.jdbc.drivers.path

hp:full-portal

Convenience goal which is equivalent to executing the following commands:

maven hp:build-portal
maven hp:deploy-portal
maven hp:init-portal-db

hp:update-portal-dependencies

Updates the dependencies for Hippo components (e.g. Hippo Portal and Hippo Repository API), Jetspeed components and other components needed by Hippo Portal and Jetspeed. The following files are updated:

  • core-build.xml
  • full-portal.xml
  • hippo-portal-components.xml
  • jetspeed-components.xml

hp:update-pa-dependencies

Updates the dependencies for Hippo components (e.g. Hippo Portal and Hippo Repository API), Jetspeed components and other components needed by Hippo Portal and Jetspeed. The following files are updated:

  • hippo-portal-components.xml

hp:psml-include

Copies PSML files in the portal project to a target folder, and includes fragments referenced by PSML import statements. The files are copied using the following properties:

build property default value description
nl.hippo.portal. jetspeed.psml.context (empty by default) The page context for your portal. This value is used to construct the full path to the PSML dir, as shown below. This value is required for the PSML include feature to work.
nl.hippo.portal. jetspeed.psml.dir ${nl.hippo.portal.home} + "/src/webapp/WEB-INF/pages/__" + ${nl.hippo.portal.jetspeed.psml.context} The full path to the folder containing the PSMLs.

The processed PSML files are copied to the build dir (e.g. <portal project dir>/target/myPortal/WEB-INF/pages/__mySite, where mySite is the psml context.

hp:j2.plugin.properties

Internal goal. Sets the properties required for building, deploying and initializing the database.