Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRESOLVER-408] Make master 2.0.0-SNAPSHOT #335

Merged
merged 13 commits into from
Oct 12, 2023
2 changes: 1 addition & 1 deletion .github/workflows/maven-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v3
with:
ff-site-run: false

jdk-matrix: '[ "17", "21" ]'

4 changes: 1 addition & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@
* under the License.
*/

// Currently we can only build with JDK8+ based on the usage
// of bnd-maven-plugin.
asfMavenTlpStdBuild( 'jdks' : [ "8", "11", "17" ] )
asfMavenTlpStdBuild( 'jdks' : [ "17", "21" ] )

2 changes: 1 addition & 1 deletion maven-resolver-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-connector-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-connector-basic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-demos</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>resolver-demo-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-demos/maven-resolver-demo-snippets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-demos</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-demo-snippets</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-demos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-demos</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-impl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-named-locks-hazelcast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-named-locks-hazelcast</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-named-locks-redisson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-named-locks-redisson</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-named-locks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-named-locks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-spi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-supplier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-supplier</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-test-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-test-util</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-transport-classpath/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-transport-classpath</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-transport-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-transport-file</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-transport-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-transport-http</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-transport-wagon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-transport-wagon</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion maven-resolver-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
</parent>

<artifactId>maven-resolver-util</artifactId>
Expand Down
91 changes: 61 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver</artifactId>
<version>1.9.17-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Maven Artifact Resolver</name>
Expand Down Expand Up @@ -85,18 +85,19 @@

<properties>
<javaVersion>8</javaVersion>
<maven.compiler.release>${javaVersion}</maven.compiler.release>
<surefire.redirectTestOutputToFile>true</surefire.redirectTestOutputToFile>
<failsafe.redirectTestOutputToFile>${surefire.redirectTestOutputToFile}</failsafe.redirectTestOutputToFile>
<maven.site.path>resolver-archives/resolver-LATEST</maven.site.path>
<checkstyle.violation.ignore>None</checkstyle.violation.ignore>
<sisuVersion>0.3.5</sisuVersion>
<guiceVersion>5.1.0</guiceVersion>
<sisuVersion>0.9.0.M2</sisuVersion>
<guiceVersion>6.0.0</guiceVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<!-- used by supplier and demo only -->
<mavenVersion>3.9.4</mavenVersion>
<minimalMavenBuildVersion>[3.8.7,)</minimalMavenBuildVersion>
<minimalJavaBuildVersion>[1.8.0-362,)</minimalJavaBuildVersion>
<project.build.outputTimestamp>2023-09-22T18:13:46Z</project.build.outputTimestamp>
<mavenVersion>3.9.5</mavenVersion>
<minimalMavenBuildVersion>[3.8.8,)</minimalMavenBuildVersion>
<minimalJavaBuildVersion>[17.0.6,)</minimalJavaBuildVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the benefit to require Java 17 to build it? Why is 11 not enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO next to last LTS is good compromise for build time requirement for our anyway dated stack we use. In other words, I want to encourage experiments, and am willing even to go for Java 21 but there are some spotless issues (@slawekjaranowski plz help). Also, I must emphasize: most resolver modules will be still release=8 compiled, but probably not all. As we may have new modules, that do want all the new nice things we can get.

Am pretty much sure, that our users run Maven on latest Java versions (unlike "aligners"), so as resolver being one of the Maven fundamentals libraries, let's make a leap here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue with spotless fix by workaround in parent apache/maven-parent#135

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't see a reason to artificially limit this. You still can build with newer ones.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is limit only for minimum - you can build by newer versions.

Copy link
Member Author

@cstamas cstamas Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There ARE technical (and human) justifications. For example, remember this thread? 😄
https://lists.apache.org/thread/k5sc3w7w4xkgjfzyxxltg06722dvspk7

In short, we tend to say "Java 8" but there are important Java updates, hence there is java 8u172 from 2018 and Java 8u371 from 2023. This thread happened to us, and clearly shows there is sense to set "lower limit". I just dont want to waste my time and resources on things like happened in that thread anymore.

This limit simply says (and means) "recent Java 17" and NOT "just any java 17" as we used to say so far. This is far better, explicit, and even the error message makes sense as shown here:
https://lists.apache.org/thread/tz4qfqhvrvf2fr84l8loqsfpmcf5poz4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can enforce 8u300+, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can, but why would I? I want to add modules that do HTTP/2, and require Java11+, moreover, for testing those I may want to use dependencies (test scoped) that are Java17...

What would limiting build time Java requirement to 8u300 help with those above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have Java 17 test deps already?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho, I would keep it as low as needed, but certainly would not put any barrier in raising the build time requirement. This would allow using multi-release JARs if needed or even leverage new JEP such as FFM (for accessing native code or memory). Whatever is needed at build time should be fine.

<project.build.outputTimestamp>2023-10-10T21:40:45Z</project.build.outputTimestamp>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -305,6 +306,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-bytecode-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
<ignoredScopes>test</ignoredScopes>
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand Down Expand Up @@ -486,31 +508,40 @@
</archive>
</configuration>
</plugin>
<!-- Remove when Parent 41 used -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.40.0</version>
<configuration>
<java>
<!-- orders of used formatters are important MPOM-376 -->
<!-- eg. palantir override importOrder, so should be first -->
<palantirJavaFormat>
<version>2.38.0</version>
</palantirJavaFormat>
<removeUnusedImports />
<importOrder>
<file>config/maven-eclipse-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>config/maven-header-plain.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<!-- https://issues.apache.org/jira/browse/MRELEASE-1111 -->
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.23</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<id>check-java-compat</id>
<goals>
<goal>check</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
Expand Down
Loading