Skip to content

Conversation

slawekjaranowski
Copy link
Member

@slawekjaranowski slawekjaranowski commented Mar 20, 2025

In order to avoid

WARNING A restricted method in java.lang.System has been called

https://issues.apache.org/jira/browse/MNG-8248

similar on master:
#1718


Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

LGTM

@slawekjaranowski
Copy link
Member Author

@michael-o @Bukama or other else can you check on Windows

@desruisseaux
Copy link
Contributor

Is it adding the --enable-native-access=ALL-UNNAMED systematically? If yes, I wonder for which feature, and whether there are safer alternatives?

@Bukama
Copy link
Contributor

Bukama commented Mar 21, 2025

@michael-o @Bukama or other else can you check on Windows

[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Maven 3.9.10-SNAPSHOT:
[INFO]
[INFO] Apache Maven ......................................................................................... SUCCESS [  6.250 s]
[INFO] Maven Model .......................................................................................... SUCCESS [  8.068 s]
[INFO] Maven Artifact ....................................................................................... SUCCESS [  3.696 s]
[INFO] Maven Plugin API ..................................................................................... SUCCESS [  2.383 s]
[INFO] Maven Builder Support ................................................................................ SUCCESS [  1.498 s]
[INFO] Maven Model Builder .................................................................................. SUCCESS [  8.548 s]
[INFO] Maven Settings ....................................................................................... SUCCESS [  1.140 s]
[INFO] Maven Settings Builder ............................................................................... SUCCESS [  1.908 s]
[INFO] Maven Repository Metadata Model ...................................................................... SUCCESS [  1.385 s]
[INFO] Maven Artifact Resolver Provider ..................................................................... SUCCESS [  6.018 s]
[INFO] Maven Core ........................................................................................... SUCCESS [ 30.410 s]
[INFO] Maven SLF4J Simple Provider .......................................................................... SUCCESS [  1.705 s]
[INFO] Maven Embedder ....................................................................................... SUCCESS [  8.170 s]
[INFO] Maven Compat ......................................................................................... SUCCESS [ 17.471 s]
[INFO] Apache Maven Distribution ............................................................................ SUCCESS [  6.300 s]
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  01:45 min
[INFO] Finished at: 2025-03-21T14:29:06+01:00
[INFO] --------------------------------------------------------------------------------------------------------------------------

D:\Github\Maven-Official-Testwiese\maven>
Apache Maven 4.0.0-rc-3 (3952d00ce65df6753b63a51e86b1f626c55a8df2)
Maven home: C:\apache-maven-4.0.0-rc-3
Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: C:\JDK\Java21
Default locale: de_DE, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "winnt"

In order to avoid

WARNING A restricted method in java.lang.System has been called
@slawekjaranowski
Copy link
Member Author

@Bukama I need a test on Windows use mvn.cmd from this PR on JDK 24
warning should not be displayed

@slawekjaranowski
Copy link
Member Author

Is it adding the --enable-native-access=ALL-UNNAMED systematically? If yes, I wonder for which feature, and whether there are safer alternatives?

@desruisseaux Please also look at jline/jline3#1067

@desruisseaux
Copy link
Contributor

Thanks for the link, I just had a look. Does anyone know for which services jline needs native access? I'm curious in particular if this is a service that Maven actually uses, and which cannot be replaced by java.io.Console.

@slawekjaranowski
Copy link
Member Author

Thanks for the link, I just had a look. Does anyone know for which services jline needs native access? I'm curious in particular if this is a service that Maven actually uses, and which cannot be replaced by java.io.Console.

@gnodet

By the way we should do such discussion in a separate place ...

@slawekjaranowski slawekjaranowski merged commit eeddfa2 into apache:maven-3.9.x Mar 24, 2025
12 checks passed
@slawekjaranowski slawekjaranowski deleted the MNG-8248 branch March 24, 2025 16:07
@github-actions github-actions bot added this to the 3.9.10 milestone Mar 24, 2025
@jira-importer
Copy link

Resolve #9615

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants