这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@cstamas
Copy link

@cstamas cstamas commented Jun 19, 2025

Motivation:

Make build "Maven 4 friendly". Also, tidy up things a bit.

Modification:

High level changes (all):

  • detach from ancient Sonatype OSS parent; introduce own "minimal parent" (merely to lock down plugin versions) + scm and other meta
  • migrate from abandoned os-detector to Maveniverse Nisse (use -Dnisse.dump to see pushed properties)
  • "pull up" all plugin versions to new minimal parent (less and simpler maintenance: https://gist.github.com/cstamas/a30cfe36c4e619b00e24eb893281ba1b )
  • update mvnw (mvnw and mvnw.cmd scripts + infra); applied mandatory http->https in comments
  • make mvnw use (currently staged and on vote) Maven 4 rc-4

Maven 4 related changes:

  • Maven 4 requires Java 17+
  • os-detector does not work with it as internal models are immutable (no more "model mangling" possible)
  • Maven 4 prevents "mutable remote repository URLs" (those having property and not literals) in POMs. Removed one in staging profile for now; without replacement for now.

Comments from superseded #14900 are applied.

With Maven 4.0.0-rc-4 soon out, picked up this again.
Comments from previous PR applied:
netty#14900

And all is much simpler, as you are already on Java 22.
@cstamas
Copy link
Author

cstamas commented Jun 19, 2025

To check what Nisse injects one can use ./mvnw -V validate -N -Dnisse.dump, and the relevant snippet:

[INFO] Nisse injecting 34 properties into User Properties
[INFO] os.detected.arch=x86_64
[INFO] nisse.os.release.version=42
[INFO] nisse.jgit.author=Tamas Cservenak <tamas@cservenak.net>
[INFO] nisse.mvn.minor=0
[INFO] nisse.os.version.minor=14
[INFO] os.detected.release.like.fedora=true
[INFO] nisse.os.version=6.14
[INFO] os.detected.release=fedora
[INFO] os.detected.version.major=6
[INFO] nisse.mvn.qualifier=rc-4
[INFO] nisse.mvn.distributionShortName=Maven
[INFO] os.detected.release.version=42
[INFO] nisse.os.version.major=6
[INFO] nisse.jgit.committer=Tamas Cservenak <tamas@cservenak.net>
[INFO] nisse.mvn.majorMinor=4.0
[INFO] os.detected.bitness=64
[INFO] os.detected.name=linux
[INFO] nisse.os.bitness=64
[INFO] nisse.mvn.distributionId=apache-maven
[INFO] nisse.os.classifier=linux-x86_64
[INFO] nisse.mvn.version=4.0.0-rc-4
[INFO] nisse.os.release=fedora
[INFO] os.detected.version=6.14
[INFO] os.detected.classifier=linux-x86_64
[INFO] nisse.mvn.buildNumber=bed0f8174bf728978f86fac533aa38a9511f3872
[INFO] nisse.jgit.date=Thu Jun 19 14:20:37 2025 +0200
[INFO] nisse.os.release.like.fedora=true
[INFO] nisse.jgit.commit=dbc04846ef4bcdd4f5d1ef1dd040e17b3992223c
[INFO] os.detected.version.minor=14
[INFO] nisse.mvn.major=4
[INFO] nisse.mvn.distributionName=Apache Maven
[INFO] nisse.os.name=linux
[INFO] nisse.mvn.patch=0
[INFO] nisse.os.arch=x86_64

The os.detected.* properties are caused by "os-detector compatibility mode". Nisse by default uses nisse.<src>.<prop> format, so for example nisse.os.release.version=42 is Nisse injected and os.detected.release.version=42 is "os detector" key present due enabled compatibility mode.

@cstamas
Copy link
Author

cstamas commented Jun 19, 2025

Are there any plans to migrate to Central Portal publishing? 😉

@cstamas
Copy link
Author

cstamas commented Jun 19, 2025

And just to clarify: this PR contains nothing "Maven 4 specific" except the wrapper.properties bit. This PR also cleans up the Netty build for Maven 3. I'd recommend using Maven 3.9.9 in wrapper if this gets merged, as 3.9.10 has issues with reactor reduction (-pl etc), and 3.9.11 is on the way.

@cstamas cstamas marked this pull request as ready for review June 19, 2025 12:59
@normanmaurer
Copy link
Member

Are there any plans to migrate to Central Portal publishing? 😉

We already do in 4.2 and 4.1 branch

@cstamas
Copy link
Author

cstamas commented Jun 19, 2025

Well, personally I'd stay away from those two plugins, they meddle too much with Maven and project internals, and also has bad reputation regarding maintenance (well, their predecessors had for sure). Naturally, I'd warmly recommend Njord instead, that does not meddle with your build and Maven, plus it supports local staging as well that may come handy.

@normanmaurer
Copy link
Member

Well, personally I'd stay away from those two plugins, they meddle too much with Maven and project internals, and also has bad reputation regarding maintenance (well, their predecessors had for sure). Naturally, I'd warmly recommend Njord instead, that does not meddle with your build and Maven, plus it supports local staging as well that may come handy.

Will checkout Njord and see if this might be a good fit for us... For now I was just happy that we figured out how to move to maven central. The migration was far from smooth to say at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants