Skip to content

Commit 7561aba

Browse files
committed
Better organisation of Maven plugins and update their version
Signed-off-by: Julien Nioche <julien@digitalpebble.com>
1 parent 2be58f8 commit 7561aba

File tree

4 files changed

+128
-63
lines changed

4 files changed

+128
-63
lines changed

client/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<plugin>
2020
<groupId>org.apache.maven.plugins</groupId>
2121
<artifactId>maven-shade-plugin</artifactId>
22-
<version>3.2.4</version>
2322
<executions>
2423
<execution>
2524
<phase>package</phase>

pom.xml

Lines changed: 126 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
24

35
<modelVersion>4.0.0</modelVersion>
46
<groupId>com.github.crawler-commons</groupId>
@@ -9,7 +11,8 @@
911

1012
<url>https://github.com/crawler-commons/url-frontier</url>
1113

12-
<description>API definition, resources and reference implementation of URL Frontiers</description>
14+
<description>API definition, resources and reference implementation of URL
15+
Frontiers</description>
1316

1417
<inceptionYear>2020</inceptionYear>
1518

@@ -23,7 +26,8 @@
2326
<scm>
2427
<url>https://github.com/crawler-commons/url-frontier</url>
2528
<connection>scm:git:git://github.com/crawler-commons/url-frontier.git</connection>
26-
<developerConnection>scm:git:git@github.com:crawler-commons/url-frontier.git</developerConnection>
29+
<developerConnection>
30+
scm:git:git@github.com:crawler-commons/url-frontier.git</developerConnection>
2731
<tag>HEAD</tag>
2832
</scm>
2933

@@ -68,6 +72,17 @@
6872
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6973
<!-- needed to build within Docker -->
7074
<skipFormatCode>false</skipFormatCode>
75+
<version.maven-enforcer-plugin>3.5.0</version.maven-enforcer-plugin>
76+
<minimalMavenBuildVersion>3.6.3</minimalMavenBuildVersion>
77+
<version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
78+
<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
79+
<version.maven-gpg-plugin>3.2.6</version.maven-gpg-plugin>
80+
<version.maven-source-plugin>3.3.1</version.maven-source-plugin>
81+
<version.maven-jar-plugin>3.4.2</version.maven-jar-plugin>
82+
<version.maven-javadoc-plugin>3.10.0</version.maven-javadoc-plugin>
83+
<version.maven-release-plugin>3.1.1</version.maven-release-plugin>
84+
<version.maven-shade-plugin>3.6.0</version.maven-shade-plugin>
85+
<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
7186
</properties>
7287

7388
<build>
@@ -76,30 +91,65 @@
7691
<plugin>
7792
<groupId>org.apache.maven.plugins</groupId>
7893
<artifactId>maven-compiler-plugin</artifactId>
79-
<version>3.9.0</version>
94+
<version>${version.maven-compiler-plugin}</version>
8095
<configuration>
8196
<release>11</release>
8297
</configuration>
8398
</plugin>
8499
<plugin>
85100
<groupId>org.apache.maven.plugins</groupId>
86101
<artifactId>maven-release-plugin</artifactId>
87-
<version>3.0.0-M5</version>
102+
<version>${version.maven-release-plugin}</version>
88103
<configuration>
89104
<autoVersionSubmodules>true</autoVersionSubmodules>
90105
<useReleaseProfile>false</useReleaseProfile>
91106
<releaseProfiles>release</releaseProfiles>
92107
<goals>deploy</goals>
93108
</configuration>
94109
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-enforcer-plugin</artifactId>
113+
<version>${version.maven-enforcer-plugin}</version>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-gpg-plugin</artifactId>
118+
<version>${version.maven-gpg-plugin}</version>
119+
<configuration>
120+
<gpgArguments>
121+
<arg>--digest-algo=SHA512</arg>
122+
</gpgArguments>
123+
</configuration>
124+
</plugin>
125+
<plugin>
126+
<groupId>org.apache.maven.plugins</groupId>
127+
<artifactId>maven-source-plugin</artifactId>
128+
<version>${version.maven-source-plugin}</version>
129+
</plugin>
130+
<plugin>
131+
<groupId>org.apache.maven.plugins</groupId>
132+
<artifactId>maven-jar-plugin</artifactId>
133+
<version>${version.maven-jar-plugin}</version>
134+
</plugin>
135+
<plugin>
136+
<groupId>org.apache.maven.plugins</groupId>
137+
<artifactId>maven-javadoc-plugin</artifactId>
138+
<version>${version.maven-javadoc-plugin}</version>
139+
</plugin>
140+
<plugin>
141+
<groupId>org.apache.maven.plugins</groupId>
142+
<artifactId>maven-shade-plugin</artifactId>
143+
<version>${version.maven-shade-plugin}</version>
144+
</plugin>
95145
</plugins>
96146
</pluginManagement>
97147

98148
<plugins>
99149
<plugin>
100150
<groupId>com.cosium.code</groupId>
101151
<artifactId>git-code-format-maven-plugin</artifactId>
102-
<version>3.3</version>
152+
<version>${git-code-format-maven-plugin.version}</version>
103153
<executions>
104154
<!-- On commit, format the modified java files -->
105155
<execution>
@@ -108,7 +158,8 @@
108158
<goal>install-hooks</goal>
109159
</goals>
110160
</execution>
111-
<!-- On Maven verify phase, fail if any file (including unmodified)
161+
<!-- On Maven verify phase, fail if any file (including
162+
unmodified)
112163
is badly formatted -->
113164
<execution>
114165
<id>validate-code-format</id>
@@ -117,34 +168,54 @@
117168
</goals>
118169
</execution>
119170
</executions>
171+
<dependencies>
172+
<!-- Enable https://github.com/google/google-java-format -->
173+
<dependency>
174+
<groupId>com.cosium.code</groupId>
175+
<artifactId>google-java-format</artifactId>
176+
<version>${git-code-format-maven-plugin.version}</version>
177+
</dependency>
178+
</dependencies>
120179
<configuration>
121-
<skip>${skipFormatCode}</skip>
122-
<googleJavaFormatOptions>
123-
<aosp>true</aosp>
124-
<fixImportsOnly>false</fixImportsOnly>
125-
<skipSortingImports>false</skipSortingImports>
126-
<skipRemovingUnusedImports>false</skipRemovingUnusedImports>
127-
</googleJavaFormatOptions>
180+
<skip>${skip.format.code}</skip>
181+
<formatterOptions>
182+
<googleJavaFormat.aosp>true</googleJavaFormat.aosp>
183+
<googleJavaFormat.fixImportsOnly>false</googleJavaFormat.fixImportsOnly>
184+
<googleJavaFormat.skipSortingImports>false</googleJavaFormat.skipSortingImports>
185+
<googleJavaFormat.skipRemovingUnusedImports>false</googleJavaFormat.skipRemovingUnusedImports>
186+
</formatterOptions>
128187
</configuration>
129188
</plugin>
130189
<plugin>
131190
<groupId>org.apache.maven.plugins</groupId>
132191
<artifactId>maven-enforcer-plugin</artifactId>
133-
<version>3.0.0</version>
134192
<executions>
135193
<execution>
136-
<id>enforce-maven</id>
194+
<id>enforce-maven-version</id>
137195
<goals>
138196
<goal>enforce</goal>
139197
</goals>
140198
<configuration>
141199
<rules>
142200
<requireMavenVersion>
143-
<version>(3.2.5,)</version>
201+
<version>${minimalMavenBuildVersion}</version>
144202
</requireMavenVersion>
145203
</rules>
146204
</configuration>
147205
</execution>
206+
<execution>
207+
<id>enforce-java-version</id>
208+
<goals>
209+
<goal>enforce</goal>
210+
</goals>
211+
<configuration>
212+
<rules>
213+
<requireJavaVersion>
214+
<version>${minimalJavaBuildVersion}</version>
215+
</requireJavaVersion>
216+
</rules>
217+
</configuration>
218+
</execution>
148219
</executions>
149220
</plugin>
150221
</plugins>
@@ -158,7 +229,6 @@
158229
<plugin>
159230
<groupId>org.apache.maven.plugins</groupId>
160231
<artifactId>maven-gpg-plugin</artifactId>
161-
<version>3.0.1</version>
162232
<executions>
163233
<execution>
164234
<id>sign-artifacts</id>
@@ -169,47 +239,44 @@
169239
</execution>
170240
</executions>
171241
</plugin>
172-
<plugin>
173-
<groupId>org.apache.maven.plugins</groupId>
174-
<artifactId>maven-source-plugin</artifactId>
175-
<version>3.2.1</version>
176-
<executions>
177-
<execution>
178-
<id>attach-sources</id>
179-
<goals>
180-
<goal>jar-no-fork</goal>
181-
</goals>
182-
</execution>
183-
</executions>
184-
</plugin>
185-
186-
<plugin>
187-
<groupId>org.apache.maven.plugins</groupId>
188-
<artifactId>maven-jar-plugin</artifactId>
189-
<version>3.2.2</version>
190-
<executions>
191-
<execution>
192-
<id>attach-test</id>
193-
<goals>
194-
<goal>test-jar</goal>
195-
</goals>
196-
</execution>
197-
</executions>
198-
</plugin>
199-
200-
<plugin>
201-
<groupId>org.apache.maven.plugins</groupId>
202-
<artifactId>maven-javadoc-plugin</artifactId>
203-
<version>3.3.1</version>
204-
<executions>
205-
<execution>
206-
<id>attach-javadocs</id>
207-
<goals>
208-
<goal>jar</goal>
209-
</goals>
210-
</execution>
211-
</executions>
212-
</plugin>
242+
<plugin>
243+
<groupId>org.apache.maven.plugins</groupId>
244+
<artifactId>maven-source-plugin</artifactId>
245+
<executions>
246+
<execution>
247+
<id>attach-sources</id>
248+
<goals>
249+
<goal>jar-no-fork</goal>
250+
</goals>
251+
</execution>
252+
</executions>
253+
</plugin>
254+
255+
<plugin>
256+
<groupId>org.apache.maven.plugins</groupId>
257+
<artifactId>maven-jar-plugin</artifactId>
258+
<executions>
259+
<execution>
260+
<id>attach-test</id>
261+
<goals>
262+
<goal>test-jar</goal>
263+
</goals>
264+
</execution>
265+
</executions>
266+
</plugin>
267+
268+
<plugin>
269+
<groupId>org.apache.maven.plugins</groupId>
270+
<artifactId>maven-javadoc-plugin</artifactId>
271+
<executions>
272+
<execution>
273+
<id>attach-javadocs</id>
274+
<goals>
275+
<goal>jar</goal>
276+
</goals>
277+
</execution>
278+
</executions>
279+
</plugin>
213280
</plugins>
214281
</build>
215282
</profile>

service/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<plugin>
2525
<groupId>org.apache.maven.plugins</groupId>
2626
<artifactId>maven-shade-plugin</artifactId>
27-
<version>3.2.4</version>
2827
<executions>
2928
<execution>
3029
<phase>package</phase>

tests/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<plugin>
3434
<groupId>org.apache.maven.plugins</groupId>
3535
<artifactId>maven-deploy-plugin</artifactId>
36-
<version>3.0.0-M2</version>
36+
<version>3.1.3</version>
3737
<configuration>
3838
<skip>true</skip>
3939
</configuration>
@@ -42,7 +42,7 @@
4242
<plugin>
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-surefire-plugin</artifactId>
45-
<version>3.0.0-M6</version>
45+
<version>3.5.0</version>
4646
<configuration>
4747
<systemPropertyVariables>
4848
<urlfrontier.host>${urlfrontier.host}</urlfrontier.host>

0 commit comments

Comments
 (0)