pom.xml 8.52 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="UTF-8"?>
<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
21
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
22
23
24
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.commons</groupId>
25
    <artifactId>xwiki-commons-pom</artifactId>
26
    <version>12.10.10</version>
27
28
    <relativePath>../xwiki-commons-pom</relativePath>
  </parent>
29
30
  <artifactId>xwiki-commons-core</artifactId>
  <name>XWiki Commons - Core - Parent POM</name>
31
  <packaging>pom</packaging>
32
  <description>XWiki Commons - Core - Parent POM</description>
33
34
35
36
  <properties>
    <!-- By default check that unit tests don't output anything to the console -->
    <xwiki.surefire.captureconsole.skip>false</xwiki.surefire.captureconsole.skip>
  </properties>
37
  <modules>
38
    <!-- Sorted Alphabetically -->
39
    <module>xwiki-commons-blame</module>
40
    <module>xwiki-commons-cache</module>
41
    <module>xwiki-commons-classloader</module>
42
    <module>xwiki-commons-collection</module>
43
    <module>xwiki-commons-component</module>
44
    <module>xwiki-commons-configuration</module>
45
    <module>xwiki-commons-context</module>
46
    <module>xwiki-commons-crypto</module>
47
48
    <module>xwiki-commons-diff</module>
    <module>xwiki-commons-displayer</module>
49
    <module>xwiki-commons-environment</module>
50
    <module>xwiki-commons-extension</module>
51
    <module>xwiki-commons-filter</module>
52
    <module>xwiki-commons-groovy</module>
53
54
    <module>xwiki-commons-job</module>
    <module>xwiki-commons-logging</module>
55
    <module>xwiki-commons-management</module>
56
57
    <module>xwiki-commons-observation</module>
    <module>xwiki-commons-properties</module>
58
    <module>xwiki-commons-repository</module>
59
    <module>xwiki-commons-script</module>
60
    <module>xwiki-commons-stability</module>
61
    <module>xwiki-commons-text</module>
62
    <module>xwiki-commons-velocity</module>
63
    <module>xwiki-commons-xml</module>
64
    <module>xwiki-commons-xstream</module>
65
  </modules>
66
  <build>
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <!-- Use the manifest file generated by the OSGi Maven Bundle Plugin -->
              <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
81
    <plugins>
82
83
84
85
86
87
88
89
90
91
92
93
94
95
      <!-- Generate OSGi Manifest information to all JARs -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
96
97
98
99
100
      <plugin>
        <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
101
102
      <plugin>
        <!-- Check license headers -->
103
104
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
105
      </plugin>
106
107
108
109
110
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
111
            <id>enforce-platform-rendering-isolation</id>
112
113
114
115
116
117
118
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
119
                    <!-- Ensure that the XWiki Commons doesn't depend on platform -->
120
                    <exclude>org.xwiki.platform:*</exclude>
121
                    <!-- Ensure that the XWiki Commons doesn't depend on rendering -->
122
                    <exclude>org.xwiki.rendering:*</exclude>
123
124
125
126
127
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
          <!-- Verify that all org.xwiki.commons dependencies in Commons have a version specified either as:
               - ${project.version}
               - a value not starting with $ (we want to allow supporting ranges)
          -->
          <execution>
            <id>check-dependency-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <validateDependencyVersion implementation="org.xwiki.tool.enforcer.ValidateDependencyVersion">
                  <versionCheck>
                    <groupIdPrefix>org.xwiki.commons</groupIdPrefix>
                    <allowedVersionRegex>\$\{project.version\}|[^$].*</allowedVersionRegex>
                  </versionCheck>
                </validateDependencyVersion>
              </rules>
            </configuration>
          </execution>
148
149
        </executions>
      </plugin>
150
151
152
153
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <configuration>
154
          <analysisConfiguration>
155
            <!-- Add ignores here using the following syntax. You can use a single <revapi.ignore> entry but it
156
157
158
159
                 cannot be empty.

                 Note: you can use regexes by using the syntax: <regex>true</regex>
                 Don't forget to '\'-escape dots and other special characters in this case ;)
160
161
            <revapi.ignore>
              <item>
162
163
164
                <code>java.class.removed</code>
                <old>class org.xwiki.velocity.tools.CollectionsTool</old>
                <justification>Not a Breakage. Moved to Legacy</justification>
Vincent Massol's avatar
Vincent Massol committed
165
              </item>
166
            </revapi.ignore>
167
            -->
168
            
169
          </analysisConfiguration>
170
171
        </configuration>
      </plugin>
172
173
174
175
      <!-- Used to automatically register our custom JUnit5 Extensions using the service loader mechanism.
           We also need to have the JAR containing our extensions visible to JUnit5's ClassLoader. This is
           done here and not in the top level pom.xml, as otherwise it would cause a cyclic dependency.
      -->
176
177
178
179
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <dependencies>
180
181
182
183
184
185
186
187
188
189
190
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-test-simple</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <dependencies>
191
192
193
194
195
196
197
          <dependency>
            <groupId>org.xwiki.commons</groupId>
            <artifactId>xwiki-commons-tool-test-simple</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
198
199
    </plugins>
  </build>
200
  <profiles>
201
    <!-- Profile to build Legacy modules -->
202
    <profile>
203
      <id>legacy</id>
204
205
206
207
      <modules>
        <module>xwiki-commons-legacy</module>
      </modules>
    </profile>
208
209
210
211
212
213
214
215
    <profile>
      <id>clover</id>
      <properties>
        <!-- Don't check that unit tests don't output anything to the console since for example Clover will output
             messages such as "Updating existing database at '...'." during tests! -->
        <xwiki.surefire.captureconsole.skip>true</xwiki.surefire.captureconsole.skip>
      </properties>
    </profile>
216
  </profiles>
217
</project>