Skip to content

Commit d979d3a

Browse files
committed
Update dependencies, and improve Maven plugin setup
1 parent f7b8226 commit d979d3a

File tree

7 files changed

+136
-43
lines changed

7 files changed

+136
-43
lines changed

.idea/kotlinc.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-tests/jul/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<properties>
1818
<maven.deploy.skip>true</maven.deploy.skip>
19+
<root-path>${project.basedir}/..</root-path>
1920
</properties>
2021

2122
<dependencies>

integration-tests/log4j/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<properties>
1818
<maven.deploy.skip>true</maven.deploy.skip>
19+
<root-path>${project.basedir}/..</root-path>
1920

2021
<log4j.version>2.24.3</log4j.version>
2122
</properties>

integration-tests/logback/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<properties>
1818
<maven.deploy.skip>true</maven.deploy.skip>
19+
<root-path>${project.basedir}/..</root-path>
1920

2021
<logback.version>1.5.15</logback.version>
2122
<logstash-logback-encoder.version>8.0</logstash-logback-encoder.version>

integration-tests/pom.xml

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616

1717
<properties>
1818
<maven.deploy.skip>true</maven.deploy.skip>
19+
<root-path>${basedir}</root-path>
1920

2021
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2122
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2223

23-
<kotlin.version>2.0.21</kotlin.version>
24+
<kotlin.version>2.1.0</kotlin.version>
2425

2526
<!-- Logging -->
2627
<devlog-kotlin.version>0.2.1-SNAPSHOT</devlog-kotlin.version>
@@ -38,15 +39,15 @@
3839
<ktfmt.version>0.43</ktfmt.version>
3940
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
4041
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
42+
<required-maven-version>3.6.3</required-maven-version>
43+
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
4144
</properties>
4245

4346
<repositories>
4447
<repository>
4548
<id>local-maven-repo</id>
46-
<url>file:///${project.basedir}/local-maven-repo</url>
49+
<url>file:///${root-path}/local-maven-repo</url>
4750
<snapshots>
48-
<!-- We always want to re-fetch this, since it's stored locally anyway, and we don't want a stale cache -->
49-
<updatePolicy>always</updatePolicy>
5051
<checksumPolicy>ignore</checksumPolicy>
5152
</snapshots>
5253
</repository>
@@ -147,13 +148,6 @@
147148
</executions>
148149
</plugin>
149150

150-
<!-- Testing -->
151-
<plugin>
152-
<groupId>org.apache.maven.plugins</groupId>
153-
<artifactId>maven-surefire-plugin</artifactId>
154-
<version>${maven-surefire-plugin.version}</version>
155-
</plugin>
156-
157151
<!-- Formatting with ktfmt -->
158152
<plugin>
159153
<groupId>com.diffplug.spotless</groupId>
@@ -178,6 +172,13 @@
178172
</executions>
179173
</plugin>
180174

175+
<!-- Testing -->
176+
<plugin>
177+
<groupId>org.apache.maven.plugins</groupId>
178+
<artifactId>maven-surefire-plugin</artifactId>
179+
<version>${maven-surefire-plugin.version}</version>
180+
</plugin>
181+
181182
<!-- Plugin for enforcing proper dependency management -->
182183
<plugin>
183184
<groupId>org.apache.maven.plugins</groupId>
@@ -191,6 +192,9 @@
191192
</goals>
192193
<configuration>
193194
<rules>
195+
<requireMavenVersion>
196+
<version>${required-maven-version}</version>
197+
</requireMavenVersion>
194198
<banDuplicatePomDependencyVersions/>
195199
<dependencyConvergence/>
196200
<requireUpperBoundDeps/>
@@ -199,6 +203,24 @@
199203
</execution>
200204
</executions>
201205
</plugin>
206+
207+
<plugin>
208+
<groupId>org.codehaus.mojo</groupId>
209+
<artifactId>versions-maven-plugin</artifactId>
210+
<version>${versions-maven-plugin.version}</version>
211+
<configuration>
212+
<rulesUri>file:///${root-path}/../rules.xml</rulesUri>
213+
</configuration>
214+
<executions>
215+
<execution>
216+
<phase>compile</phase>
217+
<goals>
218+
<goal>display-dependency-updates</goal>
219+
<goal>display-plugin-updates</goal>
220+
</goals>
221+
</execution>
222+
</executions>
223+
</plugin>
202224
</plugins>
203225
</build>
204226
</project>

pom.xml

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4242
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4343

44-
<kotlin.version>2.0.21</kotlin.version>
44+
<kotlin.version>2.1.0</kotlin.version>
4545

4646
<!-- Logging -->
47-
<slf4j.version>2.0.15</slf4j.version>
47+
<slf4j.version>2.0.16</slf4j.version>
4848
<logback.version>1.5.15</logback.version>
4949

5050
<!-- Serialization -->
@@ -60,11 +60,14 @@
6060
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
6161
<ktfmt.version>0.43</ktfmt.version>
6262
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
63-
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
6463
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
64+
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
6565
<exec-maven-plugin.version>3.5.0</exec-maven-plugin.version>
66+
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
67+
<required-maven-version>3.6.3</required-maven-version>
68+
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
6669
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
67-
<dokka-maven-plugin.version>1.9.20</dokka-maven-plugin.version>
70+
<dokka-maven-plugin.version>2.0.0</dokka-maven-plugin.version>
6871
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
6972
<central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version>
7073
</properties>
@@ -186,13 +189,6 @@
186189
</executions>
187190
</plugin>
188191

189-
<!-- Testing -->
190-
<plugin>
191-
<groupId>org.apache.maven.plugins</groupId>
192-
<artifactId>maven-surefire-plugin</artifactId>
193-
<version>${maven-surefire-plugin.version}</version>
194-
</plugin>
195-
196192
<!-- Formatting with ktfmt -->
197193
<plugin>
198194
<groupId>com.diffplug.spotless</groupId>
@@ -217,27 +213,11 @@
217213
</executions>
218214
</plugin>
219215

220-
<!-- Plugin for enforcing proper dependency management -->
216+
<!-- Testing -->
221217
<plugin>
222218
<groupId>org.apache.maven.plugins</groupId>
223-
<artifactId>maven-enforcer-plugin</artifactId>
224-
<version>${maven-enforcer-plugin.version}</version>
225-
<executions>
226-
<execution>
227-
<id>enforce</id>
228-
<goals>
229-
<goal>enforce</goal>
230-
</goals>
231-
<configuration>
232-
<rules>
233-
<banDuplicatePomDependencyVersions/>
234-
<dependencyConvergence/>
235-
<requireUpperBoundDeps/>
236-
<banDynamicVersions/>
237-
</rules>
238-
</configuration>
239-
</execution>
240-
</executions>
219+
<artifactId>maven-surefire-plugin</artifactId>
220+
<version>${maven-surefire-plugin.version}</version>
241221
</plugin>
242222

243223
<!--
@@ -268,6 +248,29 @@
268248
</executions>
269249
</plugin>
270250

251+
<!-- Purge devlog-kotlin from cache, to make sure we use newest snapshot in integration tests-->
252+
<plugin>
253+
<groupId>org.apache.maven.plugins</groupId>
254+
<artifactId>maven-dependency-plugin</artifactId>
255+
<version>${maven-dependency-plugin.version}</version>
256+
<executions>
257+
<execution>
258+
<phase>clean</phase>
259+
<goals>
260+
<goal>purge-local-repository</goal>
261+
</goals>
262+
<configuration>
263+
<manualIncludes>
264+
<include>dev.hermannm:devlog-kotlin</include>
265+
</manualIncludes>
266+
<snapshotsOnly>true</snapshotsOnly>
267+
<reResolve>false</reResolve>
268+
<actTransitively>false</actTransitively>
269+
</configuration>
270+
</execution>
271+
</executions>
272+
</plugin>
273+
271274
<!--
272275
Run integration tests from integration-tests subdirectory.
273276
See integration-tests/README.md for more on how integration tests are set up here.
@@ -296,6 +299,50 @@
296299
</executions>
297300
</plugin>
298301

302+
<!-- Plugin for enforcing proper dependency management -->
303+
<plugin>
304+
<groupId>org.apache.maven.plugins</groupId>
305+
<artifactId>maven-enforcer-plugin</artifactId>
306+
<version>${maven-enforcer-plugin.version}</version>
307+
<executions>
308+
<execution>
309+
<id>enforce</id>
310+
<goals>
311+
<goal>enforce</goal>
312+
</goals>
313+
<configuration>
314+
<rules>
315+
<requireMavenVersion>
316+
<version>${required-maven-version}</version>
317+
</requireMavenVersion>
318+
<banDuplicatePomDependencyVersions/>
319+
<dependencyConvergence/>
320+
<requireUpperBoundDeps/>
321+
<banDynamicVersions/>
322+
</rules>
323+
</configuration>
324+
</execution>
325+
</executions>
326+
</plugin>
327+
328+
<plugin>
329+
<groupId>org.codehaus.mojo</groupId>
330+
<artifactId>versions-maven-plugin</artifactId>
331+
<version>${versions-maven-plugin.version}</version>
332+
<configuration>
333+
<rulesUri>file:///${project.basedir}/rules.xml</rulesUri>
334+
</configuration>
335+
<executions>
336+
<execution>
337+
<phase>compile</phase>
338+
<goals>
339+
<goal>display-dependency-updates</goal>
340+
<goal>display-plugin-updates</goal>
341+
</goals>
342+
</execution>
343+
</executions>
344+
</plugin>
345+
299346
<!-- Generates source file JARs, required for publishing to Maven Central -->
300347
<plugin>
301348
<groupId>org.apache.maven.plugins</groupId>

rules.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Rules for versions-maven-plugin, used to display newer versions of dependencies.
4+
Copied from this StackOverflow post: https://stackoverflow.com/q/38146719/15587134
5+
-->
6+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xmlns="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0" comparisonMethod="maven"
8+
xsi:schemaLocation="http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd">
9+
<ignoreVersions>
10+
<!-- Ignore Alpha's, Beta's, release candidates and milestones -->
11+
<ignoreVersion type="regex">(?i).*Alpha(?:-?\d+)?</ignoreVersion>
12+
<ignoreVersion type="regex">(?i).*a(?:-?\d+)?</ignoreVersion>
13+
<ignoreVersion type="regex">(?i).*Beta(?:-?\d+)?</ignoreVersion>
14+
<ignoreVersion type="regex">(?i).*-B(?:-?\d+)?</ignoreVersion>
15+
<ignoreVersion type="regex">(?i).*RC(?:-?\d+)?</ignoreVersion>
16+
<ignoreVersion type="regex">(?i).*CR(?:-?\d+)?</ignoreVersion>
17+
<ignoreVersion type="regex">(?i).*M(?:-?\d+)?</ignoreVersion>
18+
</ignoreVersions>
19+
<rules>
20+
</rules>
21+
</ruleset>

0 commit comments

Comments
 (0)