Skip to content

Commit 4212382

Browse files
build(spring-boot-example): update Maven plugin versions and compiler args
1 parent 94d1715 commit 4212382

6 files changed

Lines changed: 35 additions & 15 deletions

File tree

check-deployed-package/pom.xml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
4+
45
<groupId>io.logdash</groupId>
56
<artifactId>check</artifactId>
67
<version>0.2.0-SNAPSHOT</version>
78

89
<properties>
9-
<maven.compiler.source>17</maven.compiler.source>
10-
<maven.compiler.target>17</maven.compiler.target>
10+
<java.version>17</java.version>
11+
<maven.compiler.source>${java.version}</maven.compiler.source>
12+
<maven.compiler.target>${java.version}</maven.compiler.target>
13+
<maven.compiler.release>${java.version}</maven.compiler.release>
1114
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1215
</properties>
1316

@@ -38,16 +41,22 @@
3841
<plugin>
3942
<groupId>org.apache.maven.plugins</groupId>
4043
<artifactId>maven-compiler-plugin</artifactId>
41-
<version>3.11.0</version>
44+
<version>3.12.1</version>
4245
<configuration>
43-
<source>17</source>
44-
<target>17</target>
46+
<release>${java.version}</release>
47+
<compilerArgs>
48+
<arg>-parameters</arg>
49+
<arg>-Xlint:unchecked</arg>
50+
<arg>-Xlint:deprecation</arg>
51+
<arg>-Werror</arg>
52+
</compilerArgs>
4553
</configuration>
4654
</plugin>
55+
4756
<plugin>
4857
<groupId>org.codehaus.mojo</groupId>
4958
<artifactId>exec-maven-plugin</artifactId>
50-
<version>3.1.0</version>
59+
<version>3.1.1</version>
5160
<configuration>
5261
<mainClass>io.logdash.check.Check</mainClass>
5362
</configuration>

examples/example-simple-java/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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/xsd/maven-4.0.0.xsd">
2+
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.example</groupId>
@@ -32,6 +32,7 @@
3232

3333
<build>
3434
<plugins>
35+
<!-- Compiler Plugin -->
3536
<plugin>
3637
<groupId>org.apache.maven.plugins</groupId>
3738
<artifactId>maven-compiler-plugin</artifactId>
@@ -40,6 +41,9 @@
4041
<release>${maven.compiler.release}</release>
4142
<compilerArgs>
4243
<arg>-parameters</arg>
44+
<arg>-Xlint:unchecked</arg>
45+
<arg>-Xlint:deprecation</arg>
46+
<arg>-Werror</arg>
4347
</compilerArgs>
4448
</configuration>
4549
</plugin>

examples/example-springboot/pom.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919

2020
<properties>
2121
<java.version>21</java.version>
22-
<maven.compiler.source>21</maven.compiler.source>
23-
<maven.compiler.target>21</maven.compiler.target>
24-
<maven.compiler.release>21</maven.compiler.release>
22+
<maven.compiler.source>${java.version}</maven.compiler.source>
23+
<maven.compiler.target>${java.version}</maven.compiler.target>
24+
<maven.compiler.release>${java.version}</maven.compiler.release>
25+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2526

2627
<!-- Logdash SDK Version -->
2728
<logdash-sdk.version>0.2.0-SNAPSHOT</logdash-sdk.version>
29+
30+
<!-- Plugin versions -->
31+
<maven-help-plugin.version>3.5.1</maven-help-plugin.version>
2832
</properties>
2933

3034
<dependencies>
@@ -79,23 +83,26 @@
7983
</configuration>
8084
</plugin>
8185

86+
<!-- Compiler Plugin -->
8287
<plugin>
8388
<groupId>org.apache.maven.plugins</groupId>
8489
<artifactId>maven-compiler-plugin</artifactId>
90+
<version>${maven-compiler-plugin.version}</version>
8591
<configuration>
86-
<release>21</release>
92+
<release>${java.version}</release>
8793
<compilerArgs>
8894
<arg>-parameters</arg>
8995
<arg>-Xlint:unchecked</arg>
9096
<arg>-Xlint:deprecation</arg>
97+
<arg>-Werror</arg>
9198
</compilerArgs>
9299
</configuration>
93100
</plugin>
94101

95102
<plugin>
96103
<groupId>org.apache.maven.plugins</groupId>
97104
<artifactId>maven-help-plugin</artifactId>
98-
<version>3.5.1</version>
105+
<version>${maven-help-plugin.version}</version>
99106
</plugin>
100107
</plugins>
101108
</build>

examples/example-springboot/src/main/java/io/logdash/example/service/PetService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class PetService {
2121
public PetService() {
2222
addPet("Burek", PetType.DOG);
2323
addPet("Mruczek", PetType.CAT);
24-
addPet("Rex", PetType.DOG);
24+
addPet("Olek", PetType.BIRD);
2525
}
2626

2727
public Pet addPet(String name, PetType type) {

examples/example-springboot/src/test/java/io/logdash/example/SpringBootExampleApplicationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void should_get_all_pets() {
4343
);
4444

4545
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
46-
assertThat(response.getBody()).contains("Burek", "Mruczek", "Rex");
46+
assertThat(response.getBody()).contains("Burek", "Mruczek", "Olek");
4747
}
4848

4949
@Test

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
<artifactId>maven-compiler-plugin</artifactId>
179179
<version>${maven-compiler-plugin.version}</version>
180180
<configuration>
181-
<release>${java.version}</release>
181+
<release>${maven.compiler.release}</release>
182182
<compilerArgs>
183183
<arg>-parameters</arg>
184184
<arg>-Xlint:unchecked</arg>

0 commit comments

Comments
 (0)