Description

Archetype Project to create an OpenCms Webapp with Maven. Create dependencies to the OpenCms Modules who should be included.

OpenCms is a Content Management System that is based on Open Source Software. Complex Intranet and Internet websites can be quickly and cost-effectively created, maintained and managed.

Usage

This archetypes allows you to generate a template for an OpenCms Module Package.
So, creating the template of the web-application is as easy as executing:

mvn archetype:generate -DarchetypeCatalog=http://bp-cms-commons.sourceforge.net/m2repo

Select option 2, set properties and that's all!

Example Properties to set

after calling 'mvn archetype:generate' the following Properties must be defined.

        Choose archetype:
        1: ... -> opencms-module-archetype (Archetype Project to create an OpenCms Module with Maven.)
        2: ... -> opencms-webapp-archetype (Archetype Project to create an OpenCms Webapp with Maven.)
        Choose a number:  (1,2): 2
        Define value for projectName: : Infonova OpenCms Demo
        Define value for groupId: : at.infonova.opencms
        Define value for artifactId: : infonova-opencms-demo
        Define value for version:  1.0-SNAPSHOT: :
        Define value for package:  at.infonova.opencms: :

Features

  • Quickstart:
    After generating your module, you can now create an working Webapp with "mvn install".
    It generates the OpenCms WAR with Setup Wizard.
    If you don't have some DB-JDBC-Driver in your local Repository (like Oracle's ojdbc14.jar)
    and you don't need it, simply delete it from the dependency list.
  • Maven:
    The generated Module is completely build with Maven.
    So you can use all Maven-Report Plugins you want.
    The Maven Release-Plugin works also fine.
  • OpenCms-Modules-Support:
    OpenCms-Modules (e.g.: created with "opencms-module-archetype") can simply added as dependency.
    <dependency>
            <groupId>org.opencms.modules</groupId>
            <artifactId>org.opencms.welcome</artifactId>
            <version>7.5.2</version>
    </dependency>

    The OpenCms "zip"-Package will be automatically copied to the "/WEB-INF/packages/modules" Folder.
    The JAR of the Modules will be copied to the "WEB-INF/lib" Folder.