Skip to content

Commit bc988d7

Browse files
committed
JAVA-45828: Changes made for removing warnings from Jenkins builds
1 parent 7eb8b7f commit bc988d7

File tree

11 files changed

+52
-14
lines changed

11 files changed

+52
-14
lines changed

algorithms-modules/algorithms-miscellaneous-5/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<configuration>
4848
<source>17</source>
4949
<target>17</target>
50+
<release>17</release>
5051
</configuration>
5152
</plugin>
5253
</plugins>

aws-modules/amazon-athena/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<plugin>
7171
<groupId>org.springframework.boot</groupId>
7272
<artifactId>spring-boot-maven-plugin</artifactId>
73+
<version>${spring-boot.version}</version>
7374
<configuration>
7475
<excludes>
7576
<exclude>

aws-modules/aws-app-sync/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<plugin>
4444
<groupId>org.springframework.boot</groupId>
4545
<artifactId>spring-boot-maven-plugin</artifactId>
46+
<version>${spring-boot.version}</version>
4647
</plugin>
4748
</plugins>
4849
</build>

aws-modules/aws-lambda-modules/lambda-function/pom.xml

+30
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@
2424
<groupId>com.amazonaws</groupId>
2525
<artifactId>aws-java-sdk-core</artifactId>
2626
<version>${aws-java-sdk.version}</version>
27+
<exclusions>
28+
<exclusion>
29+
<groupId>commons-logging</groupId>
30+
<artifactId>commons-logging</artifactId>
31+
</exclusion>
32+
<exclusion>
33+
<groupId>commons-codec</groupId>
34+
<artifactId>commons-codec</artifactId>
35+
</exclusion>
36+
<exclusion>
37+
<groupId>com.amazonaws</groupId>
38+
<artifactId>aws-java-sdk-pom</artifactId>
39+
</exclusion>
40+
</exclusions>
2741
</dependency>
2842
<dependency>
2943
<groupId>com.amazonaws</groupId>
@@ -85,6 +99,22 @@
8599
<version>${maven-shade-plugin.version}</version>
86100
<configuration>
87101
<createDependencyReducedPom>false</createDependencyReducedPom>
102+
<filters>
103+
<filter>
104+
<artifact>*:*</artifact>
105+
<excludes>
106+
<!-- Exclude module-info.class -->
107+
<exclude>**/module-info.class</exclude>
108+
<!-- Exclude overlapping META-INF files -->
109+
<exclude>META-INF/LICENSE</exclude>
110+
<exclude>META-INF/NOTICE</exclude>
111+
<exclude>META-INF/LICENSE.txt</exclude>
112+
<exclude>META-INF/NOTICE.txt</exclude>
113+
<exclude>META-INF/services/com.fasterxml.jackson.core.JsonFactory</exclude>
114+
<exclude>META-INF/DEPENDENCIES</exclude>
115+
</excludes>
116+
</filter>
117+
</filters>
88118
</configuration>
89119
<executions>
90120
<execution>

aws-modules/aws-rest/pom.xml

+11
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@
9494
</plugins>
9595
</build>
9696

97+
<profiles>
98+
<profile>
99+
<id>default</id>
100+
<activation>
101+
<activeByDefault>true</activeByDefault>
102+
</activation>
103+
</profile>
104+
</profiles>
105+
97106
<properties>
98107
<maven.compiler.target>21</maven.compiler.target>
99108
<maven.compiler.source>21</maven.compiler.source>
@@ -102,6 +111,8 @@
102111
<lombok.version>1.18.32</lombok.version>
103112
<junit-jupiter.version>5.5.2</junit-jupiter.version>
104113
<commons-io.version>2.16.1</commons-io.version>
114+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
115+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
105116
</properties>
106117

107118
</project>

core-java-modules/core-java-16/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<configuration>
3030
<source>${maven.compiler.source}</source>
3131
<target>${maven.compiler.target}</target>
32+
<release>${maven.compiler.release}</release>
3233
</configuration>
3334
</plugin>
3435
<plugin>
@@ -52,4 +53,7 @@
5253
</plugins>
5354
</build>
5455

56+
<properties>
57+
<maven.compiler.release>17</maven.compiler.release>
58+
</properties>
5559
</project>

core-java-modules/core-java-9-new-features/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<configuration>
4343
<source>${maven.compiler.source}</source>
4444
<target>${maven.compiler.target}</target>
45+
<release>17</release>
4546
</configuration>
4647
</plugin>
4748
</plugins>
@@ -90,7 +91,6 @@
9091
<goal>compile</goal>
9192
</goals>
9293
<configuration>
93-
<source>1.8</source>
9494
<target>1.8</target>
9595
<compileSourceRoots>
9696
<compileSourceRoot>${project.basedir}/src/main/java8</compileSourceRoot>

core-java-modules/core-java-networking-6/pom.xml

-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
<artifactId>commons-lang3</artifactId>
5050
<version>${commons-lang3.version}</version>
5151
</dependency>
52-
<dependency>
53-
<groupId>org.apache.httpcomponents.client5</groupId>
54-
<artifactId>httpclient5</artifactId>
55-
<version>${apache.httpclient5.version}</version>
56-
</dependency>
57-
5852
<dependency>
5953
<groupId>com.squareup.okhttp3</groupId>
6054
<artifactId>okhttp</artifactId>

core-java-modules/core-java-networking/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959
<artifactId>jakarta.xml.bind-api</artifactId>
6060
<version>${jakarta.bind.version}</version>
6161
</dependency>
62-
<dependency>
63-
<groupId>org.apache.httpcomponents.client5</groupId>
64-
<artifactId>httpclient5</artifactId>
65-
<version>${apache.httpclient5.version}</version>
66-
</dependency>
6762
</dependencies>
6863

6964
<build>

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
<configuration>
142142
<source>${java.version}</source>
143143
<target>${java.version}</target>
144+
<encoding>UTF-8</encoding>
144145
</configuration>
145146
</plugin>
146147
<plugin>
@@ -156,12 +157,10 @@
156157
</dependencies>
157158
<configuration>
158159
<failurePriority>5</failurePriority>
159-
<aggregate>false</aggregate>
160160
<failOnViolation>true</failOnViolation>
161161
<verbose>true</verbose>
162162
<linkXRef>true</linkXRef>
163163
<includeTests>true</includeTests>
164-
<sourceEncoding>UTF-8</sourceEncoding>
165164
<targetJdk>${java.version}</targetJdk>
166165
<rulesets>
167166
<ruleset>${tutorialsproject.basedir}/baeldung-pmd-rules.xml</ruleset>
@@ -178,6 +177,7 @@
178177
<phase>compile</phase>
179178
<goals>
180179
<goal>check</goal>
180+
<goal>pmd</goal>
181181
</goals>
182182
</execution>
183183
</executions>

testing-modules/gatling-java/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<plugin>
8888
<groupId>org.springframework.boot</groupId>
8989
<artifactId>spring-boot-maven-plugin</artifactId>
90+
<version>${spring.version}</version>
9091
<configuration>
9192
<mainClass>org.baeldung.Application</mainClass>
9293
<finalName>gatling-java</finalName>

0 commit comments

Comments
 (0)