WOProject-Maven2

Version 65.1 by Ulrich Köster on 2006/10/27 08:03

This is the home page for the Maven Plugins space.

WOProject Maven2 Plugins

Getting Started

  • Install Maven2 on a local machine.
  • Add ObjectStyle Maven2 repository to the project POM (we may distribute the plugins via Ibiblio at some point too). E.g.:
pom.xml

<pluginRepositories>
   <pluginRepository>
       <id>objectstyle</id>
       <name>ObjectStyle Public Maven2 repo</name>
       <url>http://objectstyle.org/maven2</url>
       <layout>default</layout>
       <snapshots>
           <enabled>true</enabled>
           <updatePolicy>daily</updatePolicy>
           <checksumPolicy>ignore</checksumPolicy>
       </snapshots>
       <releases>
           <enabled>true</enabled>
       </releases>
   </pluginRepository>
...
</pluginRepositories>
  • Plugins are bound to the build lifecycle via "project/build/plugins" section of the POM. Here is a general example, for more details see documentation of individual plugins:
pom.xml

<build>
   <plugins>
      <plugin>
           <groupId>org.objectstyle.woproject.maven2</groupId>

            plugin specific information goes here...

       </plugin>
   </plugins>
</build>
Information
Useful Information

By default, Maven will search the groupId org.apache.maven.plugins for prefix-to-artifactId mappings for the plug-ins it needs to perform a given build. However, WOProject maven plug-ins belong to a different group: *org.objectstyle.woproject.maven2*. Since the Maven project is assumed to have control over the default plug-in groupId, we can configure Maven to search other groupId locations for plugin-prefix mappings.

In the Maven settings file (per-user: /.m2/settings.xml; global: $M2_HOME/conf/settings.xml), you can provide a custom pluginGroups section, listing the plugin groupIds you want to search (each groupId goes in its own pluginGroup sub-element). For example, if your projects use a WOProject maven plug-in, you might have the following in your settings:

{code:xml|title=settings.xml}
<settings>
...
  <pluginGroups>
    <pluginGroup>org.objectstyle.woproject.maven2</pluginGroup>
  </pluginGroups>
...
</settings>
{code}

Now you can directly execute plug-ins, i.e. *mvn woproject:goal* instead of *mvn org.objectstyle.woproject.maven2:maven-woproject-plugin:goal*.

Reference: http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html.

xml ecample settings.xml.
zip ecample projects.