Skip to content

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

Description

@gian1200

Affected version

3.9.14

Bug description

Following apache/maven#11900

I'm getting the warning with Maven wrapper

  • OS: Windows
  • JDK: 25
  • Wrapper: mvn wrapper:wrapper -Dtype=source

It only fails when using the wrapper.

Maven

> mvn -v            
Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
Maven home: C:\Program Files\Maven\apache-maven-3.9.14
Java version: 25.0.2, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-25.0.2.10-hotspot
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

Maven Wrapper

> ./mvnw -v         
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/C:/Users/<redacted>/.m2/wrapper/dists/apache-maven-3.9.14-bin/5d54584a/apache-maven-3.9.14/lib/jansi-2.4.2.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
Maven home: C:\Users\<redacted>\.m2\wrapper\dists\apache-maven-3.9.14-bin\5d54584a\apache-maven-3.9.14
Java version: 25.0.2, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-25.0.2.10-hotspot
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions