Last modified by Paul Hoadley on 2023/12/25 05:57

Hide last authors
Lachlan Deck 1.1 1 === Configuring Maven for use with WOCommunity artifacts ===
2
Paul Hoadley 5.1 3 (% style="color:#333333" %)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 {{code language="none"}}.m2{{/code}} 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.
Lachlan Deck 1.1 4
Paul Hoadley 5.1 5 (% style="color:#333333" %)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:
Lachlan Deck 1.1 6
Paul Hoadley 5.1 7 {{code}}
Lachlan Deck 1.1 8 <settings xmlns="http://maven.apache.org/POM/4.0.0"
Paul Hoadley 5.1 9 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
Lachlan Deck 1.1 11 http://maven.apache.org/xsd/settings-1.0.0.xsd">
Paul Hoadley 5.1 12 <pluginGroups>
13 <pluginGroup>org.objectstyle.woproject.maven2</pluginGroup>
14 </pluginGroups>
Lachlan Deck 1.1 15
Paul Hoadley 5.1 16 <profiles>
17 <profile>
18 <id>default</id>
19 <activation>
20 <activeByDefault>true</activeByDefault>
21 </activation>
22 <repositories>
23 <repository>
24 <id>wocommunity.releases</id>
25 <name>WOCommunity Releases Repository</name>
26 <url>
27 http://maven.wocommunity.org/content/groups/public
28 </url>
29 <releases>
30 <enabled>true</enabled>
31 </releases>
32 <snapshots>
33 <enabled>false</enabled>
34 </snapshots>
35 </repository>
36 <repository>
37 <id>wocommunity.snapshots</id>
38 <name>WOCommunity Snapshots Repository</name>
39 <url>
40 http://maven.wocommunity.org/content/groups/public-snapshots
41 </url>
42 <releases>
43 <enabled>false</enabled>
44 </releases>
45 <snapshots>
46 <enabled>true</enabled>
47 </snapshots>
48 </repository>
49 </repositories>
50 <pluginRepositories>
51 <pluginRepository>
52 <id>wocommunity.releases</id>
53 <name>WOCommunity Releases Repository</name>
54 <url>
55 http://maven.wocommunity.org/content/groups/public
56 </url>
57 <releases>
58 <enabled>true</enabled>
59 </releases>
60 <snapshots>
61 <enabled>false</enabled>
62 </snapshots>
63 </pluginRepository>
64 <pluginRepository>
65 <id>wocommunity.snapshots</id>
66 <name>WOCommunity Snapshots Repository</name>
67 <url>
68 http://maven.wocommunity.org/content/groups/public-snapshots
69 </url>
70 <releases>
71 <enabled>false</enabled>
72 </releases>
73 <snapshots>
74 <enabled>true</enabled>
75 </snapshots>
76 </pluginRepository>
77 </pluginRepositories>
78 </profile>
79 </profiles>
Lachlan Deck 1.1 80 </settings>
81
Paul Hoadley 5.1 82 {{/code}}
Lachlan Deck 1.1 83
84 === What does this do? ===
85
86 Two things.
87
88 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.
89 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.
90
91 === Reference Documentation ===
92
Lachlan Deck 3.1 93 See [[Maven Settings Reference>>url:http://maven.apache.org/settings.html||shape="rect"]] for official apache documentation on the maven settings and options.
Lachlan Deck 1.1 94
Lachlan Deck 3.1 95 See [[settings.xml>>url:http://maven.apache.org/ref/current/maven-settings/settings.html||shape="rect"]] for official apache documentation on it's format.