Quick Start Maven Settings Configuration Guide
Configuring Maven for use with WOCommunity artifacts
Before start using Maven, you have to configure it in order to use the plug-ins provided by WOCommunity, or specifically the woproject. General Maven configuration is made in a settings.xml file. This file can be found in a folder called .m2 in each user's home directory (~/.m2 on Unix systems and C:\Documents and Settings\UserName\.m2 on Windows). If this file does not yet exist, you can just create it.
You have to define the WOProject plug-in group and the repositories to download the plug-ins. The following xml is sufficient to configure maven for using WOProject-maven plugin:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<pluginGroup>org.objectstyle.woproject.maven2</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>wocommunity.releases</id>
<name>WOCommunity Releases Repository</name>
<url>
http://maven.wocommunity.org/content/groups/public
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>wocommunity.snapshots</id>
<name>WOCommunity Snapshots Repository</name>
<url>
http://maven.wocommunity.org/content/groups/public-snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>wocommunity.releases</id>
<name>WOCommunity Releases Repository</name>
<url>
http://maven.wocommunity.org/content/groups/public
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>wocommunity.snapshots</id>
<name>WOCommunity Snapshots Repository</name>
<url>
http://maven.wocommunity.org/content/groups/public-snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
What does this do?
Two things.
- Defines a pluginGroup which provides a hint to maven for additional groupId's to look in for additional plugins that you refer to in abbreviated commands, such as for the wobootstrap plugin on the terminal. The default group maven looks in is org.apache.maven.plugins.
- Some additional repositories than the official maven repositories. This helps maven resolve and download wocommunity built artifacts that aren't already in your local or corporate maven repository.
Reference Documentation
See Maven Settings Reference for official apache documentation on the maven settings and options.
See settings.xml for official apache documentation on it's format.