Skip to content

Commit 90a7e77

Browse files
committed
Upgraded HC parent to version 15 / POM cleanup
1 parent 8b64f59 commit 90a7e77

7 files changed

Lines changed: 61 additions & 93 deletions

File tree

‎.github/workflows/maven.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ jobs:
100100
</toolchains>
101101
EOF
102102
- name: Build with Maven
103-
run: ./mvnw -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -Djunit.jupiter.execution.parallel.enabled=false -Dhc.build.toolchain.version="${HC_BUILD_TOOLCHAIN_VERSION}" ${HC_PROFILE_ARGS} -Pdocker
103+
run: ./mvnw -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -Djunit.jupiter.execution.parallel.enabled=false -DjavaVersion="${HC_BUILD_TOOLCHAIN_VERSION}" ${HC_PROFILE_ARGS} -Pdocker

‎httpclient5-jakarta-rest-client/pom.xml‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737

3838
<properties>
3939
<Automatic-Module-Name>org.apache.hc.client5.http.rest</Automatic-Module-Name>
40-
<maven.compiler.source>17</maven.compiler.source>
41-
<maven.compiler.target>17</maven.compiler.target>
40+
<javaVersion>17</javaVersion>
41+
<maven.compiler.source>${javaVersion}</maven.compiler.source>
42+
<maven.compiler.target>${javaVersion}</maven.compiler.target>
4243
</properties>
4344

4445
<dependencies>
@@ -95,13 +96,6 @@
9596
<skip>true</skip>
9697
</configuration>
9798
</plugin>
98-
<plugin>
99-
<groupId>org.codehaus.mojo</groupId>
100-
<artifactId>animal-sniffer-maven-plugin</artifactId>
101-
<configuration>
102-
<skip>true</skip>
103-
</configuration>
104-
</plugin>
10599
</plugins>
106100
</build>
107101

‎httpclient5-observation/pom.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
<dependency>
111111
<groupId>org.junit.jupiter</groupId>
112112
<artifactId>junit-jupiter-api</artifactId>
113-
<version>${junit.version}</version>
114113
<scope>test</scope>
115114
</dependency>
116115
</dependencies>

‎httpclient5-testing/pom.xml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@
120120
</dependency>
121121
</dependencies>
122122

123+
<build>
124+
<plugins>
125+
<plugin>
126+
<groupId>org.apache.maven.plugins</groupId>
127+
<artifactId>maven-surefire-plugin</artifactId>
128+
<configuration>
129+
<excludedGroups>slow,time-out,stale-conn</excludedGroups>
130+
</configuration>
131+
</plugin>
132+
</plugins>
133+
</build>
134+
123135
<profiles>
124136
<profile>
125137
<id>docker</id>
@@ -129,7 +141,6 @@
129141
<plugin>
130142
<groupId>org.apache.maven.plugins</groupId>
131143
<artifactId>maven-failsafe-plugin</artifactId>
132-
<version>${hc.surefire.version}</version>
133144
<executions>
134145
<execution>
135146
<goals>

‎httpclient5-websocket/pom.xml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
<dependency>
8282
<groupId>org.junit.jupiter</groupId>
8383
<artifactId>junit-jupiter-api</artifactId>
84-
<version>${junit.version}</version>
8584
<scope>test</scope>
8685
</dependency>
8786
</dependencies>
@@ -91,7 +90,6 @@
9190
<plugin>
9291
<groupId>org.apache.maven.plugins</groupId>
9392
<artifactId>maven-surefire-plugin</artifactId>
94-
<version>${hc.surefire.version}</version>
9593
<configuration>
9694
<useModulePath>false</useModulePath>
9795
</configuration>

‎pom.xml‎

Lines changed: 30 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<parent>
2828
<groupId>org.apache.httpcomponents</groupId>
2929
<artifactId>httpcomponents-parent</artifactId>
30-
<version>14</version>
30+
<version>15</version>
3131
</parent>
3232
<modelVersion>4.0.0</modelVersion>
3333
<groupId>org.apache.httpcomponents.client5</groupId>
@@ -60,10 +60,17 @@
6060
</distributionManagement>
6161

6262
<properties>
63-
<maven.compiler.source>1.8</maven.compiler.source>
64-
<maven.compiler.target>1.8</maven.compiler.target>
65-
<!-- Maven itself runs on Java 17+, but compilation and tests can still use an older toolchain JDK. -->
66-
<hc.build.toolchain.version>${maven.compiler.source}</hc.build.toolchain.version>
63+
<javaVersion>8</javaVersion>
64+
<minimalJavaBuildVersion>17</minimalJavaBuildVersion>
65+
<maven.compiler.source>${javaVersion}</maven.compiler.source>
66+
<maven.compiler.target>${javaVersion}</maven.compiler.target>
67+
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
68+
<api.comparison.version>5.6</api.comparison.version>
69+
70+
<!-- Disable animal sniffer. It has been superseded by compiler release version
71+
To be completely removed -->
72+
<animal.sniffer.skip>true</animal.sniffer.skip>
73+
6774
<httpcore.version>5.5-beta3</httpcore.version>
6875
<log4j.version>2.26.1</log4j.version>
6976
<brotli4j.version>1.23.0</brotli4j.version>
@@ -77,8 +84,6 @@
7784
<rxjava3.version>3.1.12</rxjava3.version>
7885
<testcontainers.version>1.21.4</testcontainers.version>
7986
<junixsocket.version>2.10.1</junixsocket.version>
80-
<api.comparison.version>5.6</api.comparison.version>
81-
<hc.animal-sniffer.signature.ignores>javax.net.ssl.SSLEngine,javax.net.ssl.SSLParameters,java.nio.ByteBuffer,java.nio.CharBuffer,jdk.net.ExtendedSocketOptions,jdk.net.Sockets</hc.animal-sniffer.signature.ignores>
8287
<commons.compress.version>1.28.0</commons.compress.version>
8388
<zstd.jni.version>1.5.7-11</zstd.jni.version>
8489
<micrometer.version>1.17.0</micrometer.version>
@@ -304,6 +309,19 @@
304309
<build>
305310
<defaultGoal>clean verify</defaultGoal>
306311
<plugins>
312+
<plugin>
313+
<groupId>org.apache.maven.plugins</groupId>
314+
<artifactId>maven-compiler-plugin</artifactId>
315+
<configuration>
316+
<source>${maven.compiler.source}</source>
317+
<target>${maven.compiler.target}</target>
318+
<!-- unset compiler release version set by the apache parent
319+
Presently core and client fail compile with java 8 release target
320+
due to the use of jdk.net classes
321+
-->
322+
<release combine.self="override"/>
323+
</configuration>
324+
</plugin>
307325
<plugin>
308326
<artifactId>maven-jar-plugin</artifactId>
309327
<configuration>
@@ -366,31 +384,9 @@
366384
</execution>
367385
</executions>
368386
</plugin>
369-
<plugin>
370-
<groupId>org.apache.maven.plugins</groupId>
371-
<artifactId>maven-enforcer-plugin</artifactId>
372-
<version>3.6.3</version>
373-
<executions>
374-
<execution>
375-
<id>enforce-java-runtime</id>
376-
<goals>
377-
<goal>enforce</goal>
378-
</goals>
379-
<configuration>
380-
<rules>
381-
<requireJavaVersion>
382-
<version>[17,)</version>
383-
<message>Apache HttpComponents Client requires Java 17 or newer to run Maven. Use toolchains to compile and test with older JDKs.</message>
384-
</requireJavaVersion>
385-
</rules>
386-
</configuration>
387-
</execution>
388-
</executions>
389-
</plugin>
390387
<plugin>
391388
<groupId>com.github.siom79.japicmp</groupId>
392389
<artifactId>japicmp-maven-plugin</artifactId>
393-
<version>0.26.1</version>
394390
<configuration>
395391
<oldVersion>
396392
<dependency>
@@ -430,7 +426,6 @@
430426
<plugin>
431427
<groupId>org.apache.rat</groupId>
432428
<artifactId>apache-rat-plugin</artifactId>
433-
<version>0.18</version>
434429
<executions>
435430
<execution>
436431
<phase>verify</phase>
@@ -453,7 +448,11 @@
453448
<plugin>
454449
<groupId>org.apache.maven.plugins</groupId>
455450
<artifactId>maven-surefire-plugin</artifactId>
456-
<version>${hc.surefire.version}</version>
451+
<!-- Several features such as group exclusion and parallel test execution
452+
in the integration test suite do not appear to work reliably with
453+
versions of maven-surefire-plugin higher than 3.5.0
454+
-->
455+
<version>3.5.0</version>
457456
<configuration>
458457
<excludedGroups>slow,time-out,stale-conn</excludedGroups>
459458
</configuration>
@@ -486,7 +485,6 @@
486485
<plugin>
487486
<groupId>org.apache.maven.plugins</groupId>
488487
<artifactId>maven-surefire-plugin</artifactId>
489-
<version>${hc.surefire.version}</version>
490488
<configuration combine.self="override">
491489
<groups>slow</groups>
492490
</configuration>
@@ -503,7 +501,6 @@
503501
<plugin>
504502
<groupId>org.apache.maven.plugins</groupId>
505503
<artifactId>maven-surefire-plugin</artifactId>
506-
<version>${hc.surefire.version}</version>
507504
<configuration combine.self="override">
508505
<excludedGroups>slow</excludedGroups>
509506
</configuration>
@@ -512,37 +509,6 @@
512509
</plugins>
513510
</build>
514511
</profile>
515-
<profile>
516-
<id>use-toolchains</id>
517-
<activation>
518-
<file>
519-
<exists>${user.home}/.m2/toolchains.xml</exists>
520-
</file>
521-
</activation>
522-
<build>
523-
<plugins>
524-
<plugin>
525-
<groupId>org.apache.maven.plugins</groupId>
526-
<artifactId>maven-toolchains-plugin</artifactId>
527-
<version>3.2.0</version>
528-
<configuration combine.self="override">
529-
<toolchains>
530-
<jdk>
531-
<version>${hc.build.toolchain.version}</version>
532-
</jdk>
533-
</toolchains>
534-
</configuration>
535-
<executions combine.self="override">
536-
<execution>
537-
<goals>
538-
<goal>toolchain</goal>
539-
</goals>
540-
</execution>
541-
</executions>
542-
</plugin>
543-
</plugins>
544-
</build>
545-
</profile>
546512
</profiles>
547513

548514

‎src/site/site.xml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,22 @@ specific language governing permissions and limitations
1818
under the License.
1919
-->
2020

21-
<project name="Apache HttpComponents Client">
21+
<site xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd"
23+
name="Apache HttpComponents Client">
2224

2325
<skin>
2426
<groupId>org.apache.maven.skins</groupId>
2527
<artifactId>maven-fluido-skin</artifactId>
26-
<version>1.9</version>
28+
<version>2.1.0</version>
2729
</skin>
2830

29-
<bannerLeft>
30-
<name>Apache</name>
31-
<src>https://www.apache.org/images/asf_logo.gif</src>
32-
<href>https://www.apache.org/</href>
31+
<bannerLeft href="https://www.apache.org/">
32+
<image alt="Apache" src="https://www.apache.org/images/asf_logo.gif" />
3333
</bannerLeft>
3434

35-
<bannerRight>
36-
<name>HttpComponents</name>
37-
<src>https://hc.apache.org/images/logos/httpcomponents.png</src>
38-
<href>https://hc.apache.org/</href>
35+
<bannerRight href="https://hc.apache.org/">
36+
<image alt="HttpComponents" src="https://hc.apache.org/images/logos/httpcomponents.png" />
3937
</bannerRight>
4038

4139
<body>
@@ -61,11 +59,13 @@ under the License.
6159
<!-- inherited -->
6260
<poweredBy>
6361
<!-- Add ApacheCon logo -->
64-
<logo name="ApacheCon" href="https://www.apache.org/events/current-event.html"
65-
img="https://www.apache.org/events/current-event-125x125.png"/>
62+
<logo href="https://www.apache.org/events/current-event.html">
63+
<image src="https://www.apache.org/events/current-event-125x125.png" alt="ApacheCon"/>
64+
</logo>
6665
<!-- Keep the default logo as well -->
67-
<logo name="Maven" href="https://maven.apache.org/"
68-
img="https://maven.apache.org/images/logos/maven-feather.png"/>
66+
<logo href="https://maven.apache.org/">
67+
<image src="https://maven.apache.org/images/logos/maven-feather.png" alt="Maven"/>
68+
</logo>
6969
</poweredBy>
7070

7171
<!-- inherited -->
@@ -79,4 +79,4 @@ under the License.
7979
<skipGenerationDate>true</skipGenerationDate>
8080
</fluidoSkin>
8181
</custom>
82-
</project>
82+
</site>

0 commit comments

Comments
 (0)