Version 1.1 by Lachlan Deck on 2011/08/13 21:20

Show last authors
1 === Configuring Maven for use with WOCommunity artifacts ===
2
3 {{color value="#333333"}}
4 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 
5 {{/color}}
6
7 {{color value="#333333"}}{{.m2{}}}{{/color}}{{color value="#333333"}} in each user's home directory (~/.m2 on Unix systems and C:Documents and SettingsUserName.m2 on Windows). If this file does not yet exist, you can just create it.{{/color}}
8
9 {{color value="#333333"}}
10 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:
11 {{/color}}
12
13 {{noformat}}
14
15 <settings xmlns="http://maven.apache.org/POM/4.0.0"
16 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
18 http://maven.apache.org/xsd/settings-1.0.0.xsd">
19 <pluginGroups>
20 <pluginGroup>org.objectstyle.woproject.maven2</pluginGroup>
21 </pluginGroups>
22
23 <profiles>
24 <profile>
25 <id>default</id>
26 <activation>
27 <activeByDefault>true</activeByDefault>
28 </activation>
29 <repositories>
30 <repository>
31 <id>wocommunity.releases</id>
32 <name>WOCommunity Releases Repository</name>
33 <url>
34 http://maven.wocommunity.org/content/groups/public
35 </url>
36 <releases>
37 <enabled>true</enabled>
38 </releases>
39 <snapshots>
40 <enabled>false</enabled>
41 </snapshots>
42 </repository>
43 <repository>
44 <id>wocommunity.snapshots</id>
45 <name>WOCommunity Snapshots Repository</name>
46 <url>
47 http://maven.wocommunity.org/content/groups/public-snapshots
48 </url>
49 <releases>
50 <enabled>false</enabled>
51 </releases>
52 <snapshots>
53 <enabled>true</enabled>
54 </snapshots>
55 </repository>
56 </repositories>
57 <pluginRepositories>
58 <pluginRepository>
59 <id>wocommunity.releases</id>
60 <name>WOCommunity Releases Repository</name>
61 <url>
62 http://maven.wocommunity.org/content/groups/public
63 </url>
64 <releases>
65 <enabled>true</enabled>
66 </releases>
67 <snapshots>
68 <enabled>false</enabled>
69 </snapshots>
70 </pluginRepository>
71 <pluginRepository>
72 <id>wocommunity.snapshots</id>
73 <name>WOCommunity Snapshots Repository</name>
74 <url>
75 http://maven.wocommunity.org/content/groups/public-snapshots
76 </url>
77 <releases>
78 <enabled>false</enabled>
79 </releases>
80 <snapshots>
81 <enabled>true</enabled>
82 </snapshots>
83 </pluginRepository>
84 </pluginRepositories>
85 </profile>
86 </profiles>
87 </settings>
88
89 {{/noformat}}
90
91 === What does this do? ===
92
93 Two things.
94
95 1. 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.
96 1. 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.
97
98 === Reference Documentation ===
99
100 See&nbsp;[[Maven Settings Reference>>http://maven.apache.org/settings.html]]&nbsp;for official apache documentation on the maven settings and options.
101
102 See&nbsp;[[settings.xml>>http://maven.apache.org/ref/current/maven-settings/settings.html]]&nbsp;for official apache documentation on it's format.