xref: /OpenGrok/pom.xml (revision 1a2ed5cf92e80419ef690aef909685020d04e0e7)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4CDDL HEADER START
5
6The contents of this file are subject to the terms of the
7Common Development and Distribution License (the "License").
8You may not use this file except in compliance with the License.
9
10See LICENSE.txt included in this distribution for the specific
11language governing permissions and limitations under the License.
12
13When distributing Covered Code, include this CDDL HEADER in each
14file and include the License file at LICENSE.txt.
15If applicable, add the following below this CDDL HEADER, with the
16fields enclosed by brackets "[]" replaced with your own identifying
17information: Portions Copyright [yyyy] [name of copyright owner]
18
19CDDL HEADER END
20
21Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights reserved.
22Portions Copyright (c) 2018, 2020, Chris Fraire <cfraire@me.com>.
23
24-->
25<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">
26    <modelVersion>4.0.0</modelVersion>
27
28    <groupId>org.opengrok</groupId>
29    <artifactId>opengrok-top</artifactId>
30    <version>1.7.32</version>
31    <packaging>pom</packaging>
32
33    <name>OpenGrok</name>
34    <url>https://oracle.github.io/opengrok/</url>
35    <organization>
36        <name>Oracle</name>
37        <url>http://www.oracle.com</url>
38    </organization>
39    <licenses>
40        <license>
41            <name>CDDL 1</name>
42            <url>http://opensource.org/licenses/CDDL-1.0</url>
43            <distribution>repo</distribution>
44        </license>
45    </licenses>
46
47    <modules>
48        <module>plugins</module>
49        <module>opengrok-indexer</module>
50        <module>opengrok-web</module>
51        <module>distribution</module>
52        <module>suggester</module>
53        <module>tools</module>
54    </modules>
55
56    <scm>
57        <connection>scm:git:ssh://git@github.com:OpenGrok/OpenGrok.git</connection>
58        <developerConnection>scm:git:ssh://git@github.com:OpenGrok/OpenGrok.git</developerConnection>
59        <url>ssh://git@github.com:OpenGrok/OpenGrok.git</url>
60    </scm>
61
62    <properties>
63        <lucene.version>8.11.0</lucene.version>
64        <mavenjavadocplugin.version>3.2.0</mavenjavadocplugin.version>
65        <!-- The following changed syntax from e.g. 1.8 to 11. -->
66        <compileSource>11</compileSource>
67        <compileTarget>11</compileTarget>
68        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
69        <jersey.version>3.0.2</jersey.version>
70        <!-- Jackson version needs to match the version of Jackson which Jersey
71        depends on or otherwise weird things will happen. -->
72        <jackson.version>2.12.2</jackson.version>
73        <junit.version>5.7.2</junit.version>
74        <hamcrest.version>2.2</hamcrest.version>
75        <maven-surefire.version>3.0.0-M5</maven-surefire.version>
76        <apache-commons-lang3.version>3.12.0</apache-commons-lang3.version>
77        <micrometer.version>1.8.2</micrometer.version>
78        <mockito.version>3.12.4</mockito.version>
79    </properties>
80
81    <dependencyManagement>
82        <dependencies>
83            <dependency>
84                <groupId>org.junit.jupiter</groupId>
85                <artifactId>junit-jupiter-engine</artifactId>
86                <version>${junit.version}</version>
87            </dependency>
88            <dependency>
89                <groupId>org.junit.vintage</groupId>
90                <artifactId>junit-vintage-engine</artifactId>
91                <version>${junit.version}</version>
92            </dependency>
93            <dependency>
94                <groupId>org.junit.jupiter</groupId>
95                <artifactId>junit-jupiter-params</artifactId>
96                <version>${junit.version}</version>
97            </dependency>
98            <dependency>
99                <groupId>org.hamcrest</groupId>
100                <artifactId>hamcrest-library</artifactId>
101                <version>${hamcrest.version}</version>
102                <scope>test</scope>
103            </dependency>
104            <dependency>
105                <groupId>org.apache.bcel</groupId>
106                <artifactId>bcel</artifactId>
107                <version>6.5.0</version>
108            </dependency>
109            <dependency>
110                <groupId>org.apache.lucene</groupId>
111                <artifactId>lucene-core</artifactId>
112                <version>${lucene.version}</version>
113            </dependency>
114            <dependency>
115                <groupId>org.apache.lucene</groupId>
116                <artifactId>lucene-analyzers-common</artifactId>
117                <version>${lucene.version}</version>
118            </dependency>
119            <dependency>
120                <groupId>org.apache.lucene</groupId>
121                <artifactId>lucene-highlighter</artifactId>
122                <version>${lucene.version}</version>
123            </dependency>
124            <dependency>
125                <groupId>org.apache.lucene</groupId>
126                <artifactId>lucene-join</artifactId>
127                <version>${lucene.version}</version>
128            </dependency>
129            <dependency>
130                <groupId>org.apache.lucene</groupId>
131                <artifactId>lucene-memory</artifactId>
132                <version>${lucene.version}</version>
133            </dependency>
134            <dependency>
135                <groupId>org.apache.lucene</groupId>
136                <artifactId>lucene-queries</artifactId>
137                <version>${lucene.version}</version>
138            </dependency>
139            <dependency>
140                <groupId>org.apache.lucene</groupId>
141                <artifactId>lucene-queryparser</artifactId>
142                <version>${lucene.version}</version>
143            </dependency>
144            <dependency>
145                <groupId>org.apache.lucene</groupId>
146                <artifactId>lucene-suggest</artifactId>
147                <version>${lucene.version}</version>
148            </dependency>
149            <dependency>
150                <groupId>jakarta.servlet</groupId>
151                <artifactId>jakarta.servlet-api</artifactId>
152                <version>5.0.0</version>
153                <scope>provided</scope>
154            </dependency>
155            <dependency>
156                <groupId>org.apache.ant</groupId>
157                <artifactId>ant</artifactId>
158                <version>1.10.11</version>
159            </dependency>
160            <dependency>
161                <groupId>org.glassfish.jaxb</groupId>
162                <artifactId>jaxb-runtime</artifactId>
163                <version>3.0.2</version>
164            </dependency>
165            <dependency>
166                <groupId>org.mockito</groupId>
167                <artifactId>mockito-core</artifactId>
168                <version>${mockito.version}</version>
169                <scope>test</scope>
170            </dependency>
171            <dependency>
172                <groupId>org.awaitility</groupId>
173                <artifactId>awaitility</artifactId>
174                <version>4.1.0</version>
175                <scope>test</scope>
176                <exclusions>
177                    <exclusion>
178                        <groupId>org.hamcrest</groupId>
179                        <artifactId>hamcrest</artifactId>
180                    </exclusion>
181                </exclusions>
182            </dependency>
183            <dependency>
184                <groupId>org.jetbrains</groupId>
185                <artifactId>annotations</artifactId>
186                <version>22.0.0</version>
187                <scope>provided</scope>
188            </dependency>
189        </dependencies>
190    </dependencyManagement>
191
192    <repositories>
193        <repository>
194            <snapshots>
195                <enabled>false</enabled>
196            </snapshots>
197            <id>central</id>
198            <name>Central Repository</name>
199            <url>https://repo.maven.apache.org/maven2/</url>
200        </repository>
201    </repositories>
202    <pluginRepositories>
203        <pluginRepository>
204            <snapshots>
205                <enabled>false</enabled>
206            </snapshots>
207            <id>central</id>
208            <name>Central Repository</name>
209            <url>https://repo.maven.apache.org/maven2/</url>
210        </pluginRepository>
211    </pluginRepositories>
212
213    <build>
214        <plugins>
215            <plugin>
216                <groupId>org.apache.maven.plugins</groupId>
217                <artifactId>maven-enforcer-plugin</artifactId>
218                <version>3.0.0-M3</version>
219                <executions>
220                  <execution>
221                    <id>enforce-maven</id>
222                    <goals>
223                      <goal>enforce</goal>
224                    </goals>
225                    <configuration>
226                      <rules>
227                        <banDuplicatePomDependencyVersions/>
228                        <requireMavenVersion>
229                          <version>3.0.5</version>
230                        </requireMavenVersion>
231                        <requireJavaVersion>
232                          <version>11</version>
233                        </requireJavaVersion>
234                      </rules>
235                    </configuration>
236                  </execution>
237                </executions>
238            </plugin>
239            <plugin>
240                <artifactId>maven-assembly-plugin</artifactId>
241                <version>3.1.0</version>
242                <configuration>
243                    <descriptors>
244                        <descriptor>assembly.xml</descriptor>
245                    </descriptors>
246                </configuration>
247            </plugin>
248            <plugin>
249                <groupId>org.apache.maven.plugins</groupId>
250                <artifactId>maven-compiler-plugin</artifactId>
251                <configuration>
252                    <source>${compileSource}</source>
253                    <target>${compileTarget}</target>
254                    <encoding>${project.build.sourceEncoding}</encoding>
255                    <compilerArgs>
256                      <arg>-Xlint:all</arg>
257                      <arg>-Werror</arg>
258                      <!-- meant for autogenerated sources -->
259                      <arg>-Xlint:-auxiliaryclass</arg>
260                      <arg>-Xlint:-fallthrough</arg>
261                    </compilerArgs>
262                </configuration>
263                <version>3.8.1</version>
264            </plugin>
265            <plugin>
266                <!-- UNIT TEST RUNNER -->
267                <groupId>org.apache.maven.plugins</groupId>
268                <artifactId>maven-surefire-plugin</artifactId>
269                <configuration>
270                    <forkCount>1</forkCount>
271                    <reuseForks>false</reuseForks>
272                    <trimStackTrace>false</trimStackTrace>
273                </configuration>
274                <version>${maven-surefire.version}</version>
275                <executions>
276                    <execution>
277                        <id>run-unit-tests</id>
278                        <goals>
279                            <goal>test</goal>
280                        </goals>
281                    </execution>
282                </executions>
283            </plugin>
284            <plugin>
285                <groupId>org.jacoco</groupId>
286                <artifactId>jacoco-maven-plugin</artifactId>
287                <version>0.8.7</version>
288                <executions>
289                    <!-- Prepare execution with Surefire -->
290                    <execution>
291                        <id>pre-unit-test</id>
292                        <goals>
293                            <goal>prepare-agent</goal>
294                        </goals>
295                        <configuration>
296                            <propertyName>surefireArgLine</propertyName>
297                        </configuration>
298                    </execution>
299                    <!-- Generate report after tests are run -->
300                    <execution>
301                        <id>post-unit-test</id>
302                        <phase>test</phase>
303                        <goals>
304                            <goal>report</goal>
305                        </goals>
306                    </execution>
307                </executions>
308            </plugin>
309            <plugin>
310              <groupId>org.eluder.coveralls</groupId>
311              <artifactId>coveralls-maven-plugin</artifactId>
312              <version>4.3.0</version>
313              <dependencies>
314                <!-- Explicit dep on jaxb-api to avoid problems with
315                  JDK9 and later, until a new version of
316                  coveralls-maven-plugin is released.
317                  See also https://github.com/trautonen/coveralls-maven-plugin/issues/112-->
318                <dependency>
319                  <groupId>javax.xml.bind</groupId>
320                  <artifactId>jaxb-api</artifactId>
321                  <version>2.3.1</version>
322                </dependency>
323              </dependencies>
324            </plugin>
325            <plugin>
326                <groupId>org.apache.maven.plugins</groupId>
327                <artifactId>maven-javadoc-plugin</artifactId>
328                <version>${mavenjavadocplugin.version}</version>
329                <executions>
330                  <execution>
331                    <goals>
332                      <goal>javadoc</goal>
333                      <goal>test-javadoc</goal>
334                    </goals>
335                    <phase>verify</phase>
336                  </execution>
337                </executions>
338                <configuration>
339                    <verbose>true</verbose>
340                    <!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8212233 -->
341                    <javaApiLinks>
342                        <property>
343                            <name>foo</name>
344                            <value>bar</value>
345                        </property>
346                    </javaApiLinks>
347                    <sourceFileExcludes>
348                        <!-- workarounds for https://github.com/jflex-de/jflex/issues/542 -->
349                        <exclude>**/HistoryLineTokenizer.java</exclude>
350                        <exclude>**/PlainLineTokenizer.java</exclude>
351                        <exclude>**/XrefSourceTransformer.java</exclude>
352                    </sourceFileExcludes>
353                </configuration>
354            </plugin>
355            <plugin>
356                <artifactId>maven-project-info-reports-plugin</artifactId>
357                <version>3.1.2</version>
358            </plugin>
359            <plugin>
360                <groupId>org.owasp</groupId>
361                <artifactId>dependency-check-maven</artifactId>
362                <version>7.0.2</version>
363                <configuration>
364                    <skipSystemScope>true</skipSystemScope>
365                    <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
366                </configuration>
367                <executions>
368                    <execution>
369                        <goals>
370                            <goal>aggregate</goal>
371                        </goals>
372                    </execution>
373                </executions>
374            </plugin>
375            <plugin>
376                <groupId>org.apache.maven.plugins</groupId>
377                <artifactId>maven-site-plugin</artifactId>
378                <version>3.9.1</version>
379            </plugin>
380        </plugins>
381        <pluginManagement>
382            <plugins>
383                <plugin>
384                    <groupId>org.apache.maven.plugins</groupId>
385                    <artifactId>maven-checkstyle-plugin</artifactId>
386                    <version>3.1.2</version>
387                    <dependencies>
388                        <dependency>
389                            <groupId>com.puppycrawl.tools</groupId>
390                            <artifactId>checkstyle</artifactId>
391                            <version>9.1</version>
392                        </dependency>
393                    </dependencies>
394                    <executions>
395                        <execution>
396                            <id>checkstyle</id>
397                            <phase>validate</phase>
398                            <configuration>
399                                <configLocation>/dev/checkstyle/style.xml</configLocation>
400                                <encoding>UTF-8</encoding>
401                                <consoleOutput>true</consoleOutput>
402                                <failsOnError>true</failsOnError>
403                                <suppressionsLocation>/dev/checkstyle/suppressions.xml</suppressionsLocation>
404                                <headerLocation>/dev/checkstyle/fileheader.txt</headerLocation>
405                                <includeTestSourceDirectory>true</includeTestSourceDirectory>
406                                <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
407                                <testSourceDirectories>${project.build.testSourceDirectory}</testSourceDirectories>
408                            </configuration>
409                            <goals>
410                                <goal>check</goal>
411                            </goals>
412                        </execution>
413                    </executions>
414                </plugin>
415                <plugin>
416                    <groupId>org.apache.maven.plugins</groupId>
417                    <artifactId>maven-resources-plugin</artifactId>
418                    <version>3.2.0</version>
419                    <configuration>
420                        <addDefaultExcludes>false</addDefaultExcludes>
421                    </configuration>
422                </plugin>
423            </plugins>
424        </pluginManagement>
425    </build>
426
427    <profiles>
428        <profile>
429            <id>java12plus-11-release</id>
430            <activation>
431                <jdk>[12,20]</jdk>
432            </activation>
433            <build>
434                <plugins>
435                    <plugin>
436                        <artifactId>maven-compiler-plugin</artifactId>
437                        <configuration>
438                            <release>11</release>
439                        </configuration>
440                    </plugin>
441                </plugins>
442            </build>
443        </profile>
444        <profile>
445          <id>sonar</id>
446          <properties>
447            <sonar.host.url>https://sonarcloud.io</sonar.host.url>
448            <sonar.organization>opengrok</sonar.organization>
449          </properties>
450          <build>
451            <plugins>
452              <plugin>
453                <groupId>org.jacoco</groupId>
454                <artifactId>jacoco-maven-plugin</artifactId>
455              </plugin>
456              <plugin>
457                <groupId>org.sonarsource.scanner.maven</groupId>
458                <artifactId>sonar-maven-plugin</artifactId>
459                <version>3.9.1.2184</version>
460              </plugin>
461            </plugins>
462          </build>
463        </profile>
464    </profiles>
465
466    <reporting>
467        <plugins>
468            <plugin>
469                <groupId>com.github.spotbugs</groupId>
470                <artifactId>spotbugs-maven-plugin</artifactId>
471                <version>4.2.3</version>
472                <configuration>
473                    <xmlOutput>true</xmlOutput>
474                    <includeFilterFile>dev/findbugs_filter.xml</includeFilterFile>
475                    <xmlOutputDirectory>
476                        ${project.build.directory}/findbugs-reports
477                    </xmlOutputDirectory>
478                    <effort>max</effort>
479                    <onlyAnalyze>org.opengrok.*</onlyAnalyze>
480                </configuration>
481            </plugin>
482            <plugin>
483                <groupId>org.apache.maven.plugins</groupId>
484                <artifactId>maven-pmd-plugin</artifactId>
485                <version>3.14.0</version>
486                <reportSets>
487                    <reportSet>
488                        <reports>
489                            <report>pmd</report>
490                            <report>cpd</report>
491                        </reports>
492                    </reportSet>
493                </reportSets>
494                <configuration>
495                    <rulesets>
496                        <ruleset>dev/pmd_ruleset.xml</ruleset>
497                    </rulesets>
498                    <targetJdk>${compileTarget}</targetJdk>
499                    <aggregate>true</aggregate>
500                </configuration>
501            </plugin>
502            <plugin>
503                <groupId>org.apache.maven.plugins</groupId>
504                <artifactId>maven-docck-plugin</artifactId>
505                <version>1.1</version>
506            </plugin>
507            <plugin>
508                <groupId>org.apache.maven.plugins</groupId>
509                <artifactId>maven-javadoc-plugin</artifactId>
510                <version>${mavenjavadocplugin.version}</version>
511                <reportSets>
512                    <reportSet>
513                        <id>non-aggregate</id>
514                        <reports>
515                            <report>javadoc</report>
516                        </reports>
517                    </reportSet>
518                    <reportSet>
519                        <id>aggregate</id>
520                        <reports>
521                            <report>aggregate</report>
522                        </reports>
523                    </reportSet>
524                </reportSets>
525            </plugin>
526            <plugin>
527                <groupId>org.apache.maven.plugins</groupId>
528                <artifactId>maven-surefire-report-plugin</artifactId>
529                <version>${maven-surefire.version}</version>
530            </plugin>
531            <plugin>
532                <groupId>org.apache.maven.plugins</groupId>
533                <artifactId>maven-jxr-plugin</artifactId>
534                <version>3.1.1</version>
535            </plugin>
536        </plugins>
537    </reporting>
538</project>
539