Skip to content

Commit 6717743

Browse files
authored
Merge pull request #102 from crawler-commons/mvnPluginUpdates
Better organisation of Maven plugins and update their version
2 parents 449d1c2 + dc7f009 commit 6717743

File tree

4 files changed

+130
-63
lines changed

4 files changed

+130
-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

@@ -74,6 +78,17 @@
7478
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7579
<!-- needed to build within Docker -->
7680
<skipFormatCode>false</skipFormatCode>
81+
<version.maven-enforcer-plugin>3.5.0</version.maven-enforcer-plugin>
82+
<minimalMavenBuildVersion>3.6.3</minimalMavenBuildVersion>
83+
<version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
84+
<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
85+
<version.maven-gpg-plugin>3.2.6</version.maven-gpg-plugin>
86+
<version.maven-source-plugin>3.3.1</version.maven-source-plugin>
87+
<version.maven-jar-plugin>3.4.2</version.maven-jar-plugin>
88+
<version.maven-javadoc-plugin>3.10.0</version.maven-javadoc-plugin>
89+
<version.maven-release-plugin>3.1.1</version.maven-release-plugin>
90+
<version.maven-shade-plugin>3.6.0</version.maven-shade-plugin>
91+
<minimalJavaBuildVersion>11</minimalJavaBuildVersion>
7792
</properties>
7893

7994
<build>
@@ -82,30 +97,65 @@
8297
<plugin>
8398
<groupId>org.apache.maven.plugins</groupId>
8499
<artifactId>maven-compiler-plugin</artifactId>
85-
<version>3.9.0</version>
100+
<version>${version.maven-compiler-plugin}</version>
86101
<configuration>
87102
<release>11</release>
88103
</configuration>
89104
</plugin>
90105
<plugin>
91106
<groupId>org.apache.maven.plugins</groupId>
92107
<artifactId>maven-release-plugin</artifactId>
93-
<version>3.0.0-M5</version>
108+
<version>${version.maven-release-plugin}</version>
94109
<configuration>
95110
<autoVersionSubmodules>true</autoVersionSubmodules>
96111
<useReleaseProfile>false</useReleaseProfile>
97112
<releaseProfiles>release</releaseProfiles>
98113
<goals>deploy</goals>
99114
</configuration>
100115
</plugin>
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-enforcer-plugin</artifactId>
119+
<version>${version.maven-enforcer-plugin}</version>
120+
</plugin>
121+
<plugin>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-gpg-plugin</artifactId>
124+
<version>${version.maven-gpg-plugin}</version>
125+
<configuration>
126+
<gpgArguments>
127+
<arg>--digest-algo=SHA512</arg>
128+
</gpgArguments>
129+
</configuration>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-source-plugin</artifactId>
134+
<version>${version.maven-source-plugin}</version>
135+
</plugin>
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-jar-plugin</artifactId>
139+
<version>${version.maven-jar-plugin}</version>
140+
</plugin>
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-javadoc-plugin</artifactId>
144+
<version>${version.maven-javadoc-plugin}</version>
145+
</plugin>
146+
<plugin>
147+
<groupId>org.apache.maven.plugins</groupId>
148+
<artifactId>maven-shade-plugin</artifactId>
149+
<version>${version.maven-shade-plugin}</version>
150+
</plugin>
101151
</plugins>
102152
</pluginManagement>
103153

104154
<plugins>
105155
<plugin>
106156
<groupId>com.cosium.code</groupId>
107157
<artifactId>git-code-format-maven-plugin</artifactId>
108-
<version>3.3</version>
158+
<version>${git-code-format-maven-plugin.version}</version>
109159
<executions>
110160
<!-- On commit, format the modified java files -->
111161
<execution>
@@ -114,7 +164,8 @@
114164
<goal>install-hooks</goal>
115165
</goals>
116166
</execution>
117-
<!-- On Maven verify phase, fail if any file (including unmodified)
167+
<!-- On Maven verify phase, fail if any file (including
168+
unmodified)
118169
is badly formatted -->
119170
<execution>
120171
<id>validate-code-format</id>
@@ -123,34 +174,54 @@
123174
</goals>
124175
</execution>
125176
</executions>
177+
<dependencies>
178+
<!-- Enable https://github.com/google/google-java-format -->
179+
<dependency>
180+
<groupId>com.cosium.code</groupId>
181+
<artifactId>google-java-format</artifactId>
182+
<version>${git-code-format-maven-plugin.version}</version>
183+
</dependency>
184+
</dependencies>
126185
<configuration>
127-
<skip>${skipFormatCode}</skip>
128-
<googleJavaFormatOptions>
129-
<aosp>true</aosp>
130-
<fixImportsOnly>false</fixImportsOnly>
131-
<skipSortingImports>false</skipSortingImports>
132-
<skipRemovingUnusedImports>false</skipRemovingUnusedImports>
133-
</googleJavaFormatOptions>
186+
<skip>${skip.format.code}</skip>
187+
<formatterOptions>
188+
<googleJavaFormat.aosp>true</googleJavaFormat.aosp>
189+
<googleJavaFormat.fixImportsOnly>false</googleJavaFormat.fixImportsOnly>
190+
<googleJavaFormat.skipSortingImports>false</googleJavaFormat.skipSortingImports>
191+
<googleJavaFormat.skipRemovingUnusedImports>false</googleJavaFormat.skipRemovingUnusedImports>
192+
</formatterOptions>
134193
</configuration>
135194
</plugin>
136195
<plugin>
137196
<groupId>org.apache.maven.plugins</groupId>
138197
<artifactId>maven-enforcer-plugin</artifactId>
139-
<version>3.0.0</version>
140198
<executions>
141199
<execution>
142-
<id>enforce-maven</id>
200+
<id>enforce-maven-version</id>
143201
<goals>
144202
<goal>enforce</goal>
145203
</goals>
146204
<configuration>
147205
<rules>
148206
<requireMavenVersion>
149-
<version>(3.2.5,)</version>
207+
<version>${minimalMavenBuildVersion}</version>
150208
</requireMavenVersion>
151209
</rules>
152210
</configuration>
153211
</execution>
212+
<execution>
213+
<id>enforce-java-version</id>
214+
<goals>
215+
<goal>enforce</goal>
216+
</goals>
217+
<configuration>
218+
<rules>
219+
<requireJavaVersion>
220+
<version>${minimalJavaBuildVersion}</version>
221+
</requireJavaVersion>
222+
</rules>
223+
</configuration>
224+
</execution>
154225
</executions>
155226
</plugin>
156227
</plugins>
@@ -164,7 +235,6 @@
164235
<plugin>
165236
<groupId>org.apache.maven.plugins</groupId>
166237
<artifactId>maven-gpg-plugin</artifactId>
167-
<version>3.0.1</version>
168238
<executions>
169239
<execution>
170240
<id>sign-artifacts</id>
@@ -175,47 +245,44 @@
175245
</execution>
176246
</executions>
177247
</plugin>
178-
<plugin>
179-
<groupId>org.apache.maven.plugins</groupId>
180-
<artifactId>maven-source-plugin</artifactId>
181-
<version>3.2.1</version>
182-
<executions>
183-
<execution>
184-
<id>attach-sources</id>
185-
<goals>
186-
<goal>jar-no-fork</goal>
187-
</goals>
188-
</execution>
189-
</executions>
190-
</plugin>
191-
192-
<plugin>
193-
<groupId>org.apache.maven.plugins</groupId>
194-
<artifactId>maven-jar-plugin</artifactId>
195-
<version>3.2.2</version>
196-
<executions>
197-
<execution>
198-
<id>attach-test</id>
199-
<goals>
200-
<goal>test-jar</goal>
201-
</goals>
202-
</execution>
203-
</executions>
204-
</plugin>
205-
206-
<plugin>
207-
<groupId>org.apache.maven.plugins</groupId>
208-
<artifactId>maven-javadoc-plugin</artifactId>
209-
<version>3.3.1</version>
210-
<executions>
211-
<execution>
212-
<id>attach-javadocs</id>
213-
<goals>
214-
<goal>jar</goal>
215-
</goals>
216-
</execution>
217-
</executions>
218-
</plugin>
248+
<plugin>
249+
<groupId>org.apache.maven.plugins</groupId>
250+
<artifactId>maven-source-plugin</artifactId>
251+
<executions>
252+
<execution>
253+
<id>attach-sources</id>
254+
<goals>
255+
<goal>jar-no-fork</goal>
256+
</goals>
257+
</execution>
258+
</executions>
259+
</plugin>
260+
261+
<plugin>
262+
<groupId>org.apache.maven.plugins</groupId>
263+
<artifactId>maven-jar-plugin</artifactId>
264+
<executions>
265+
<execution>
266+
<id>attach-test</id>
267+
<goals>
268+
<goal>test-jar</goal>
269+
</goals>
270+
</execution>
271+
</executions>
272+
</plugin>
273+
274+
<plugin>
275+
<groupId>org.apache.maven.plugins</groupId>
276+
<artifactId>maven-javadoc-plugin</artifactId>
277+
<executions>
278+
<execution>
279+
<id>attach-javadocs</id>
280+
<goals>
281+
<goal>jar</goal>
282+
</goals>
283+
</execution>
284+
</executions>
285+
</plugin>
219286
</plugins>
220287
</build>
221288
</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: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@
2626
<urlfrontier.port>7071</urlfrontier.port>
2727
<maven.test.skip>true</maven.test.skip>
2828
<slf4j.version>2.0.3</slf4j.version>
29+
<version.maven-surefire-plugin>3.5.0</version.maven-surefire-plugin>
30+
<version.maven-deploy-plugin>3.1.3</version.maven-deploy-plugin>
2931
</properties>
3032

3133
<build>
3234
<plugins>
3335
<plugin>
3436
<groupId>org.apache.maven.plugins</groupId>
3537
<artifactId>maven-deploy-plugin</artifactId>
36-
<version>3.0.0-M2</version>
38+
<version>${version.maven-deploy-plugin}</version>
3739
<configuration>
3840
<skip>true</skip>
3941
</configuration>
@@ -42,7 +44,7 @@
4244
<plugin>
4345
<groupId>org.apache.maven.plugins</groupId>
4446
<artifactId>maven-surefire-plugin</artifactId>
45-
<version>3.0.0-M6</version>
47+
<version>${version.maven-surefire-plugin}</version>
4648
<configuration>
4749
<systemPropertyVariables>
4850
<urlfrontier.host>${urlfrontier.host}</urlfrontier.host>

0 commit comments

Comments
 (0)