Hello, I've created a new project using the Spring initalizr:
curl -G https://start.spring.io/starter.zip -d dependencies=native,actuator,web -d javaVersion=17 -d type=maven-project -o demo.zip
unzip demo.zip -d starter
cd starter
Then, when I built it, I got:
./mvnw clean package
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ demo ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ demo ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 0 resource from src/main/resources to target/classes
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ demo ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 1 source file with javac [debug release 17] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ demo ---
[INFO] skip non existing resourceDirectory /Users/anthonyd2/Downloads/starter/src/test/resources
[INFO]
[INFO] --- compiler:3.11.0:testCompile (default-testCompile) @ demo ---
[INFO] Changes detected - recompiling the module! :dependency
[INFO] Compiling 1 source file with javac [debug release 17] to target/test-classes
[INFO]
[INFO] --- surefire:3.0.0:test (default-test) @ demo ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.demo.DemoApplicationTests
23:14:03.712 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.example.demo.DemoApplicationTests]: DemoApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
23:14:03.758 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.example.demo.DemoApplication for test class com.example.demo.DemoApplicationTests
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.1.0)
2023-06-12T23:14:03.912-04:00 INFO 58881 --- [ main] com.example.demo.DemoApplicationTests : Starting DemoApplicationTests using Java 17.0.6 with PID 58881 (started by anthonyd2 in /Users/anthonyd2/Downloads/starter)
2023-06-12T23:14:03.913-04:00 INFO 58881 --- [ main] com.example.demo.DemoApplicationTests : No active profile set, falling back to 1 default profile: "default"
2023-06-12T23:14:04.582-04:00 INFO 58881 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
2023-06-12T23:14:04.608-04:00 INFO 58881 --- [ main] com.example.demo.DemoApplicationTests : Started DemoApplicationTests in 0.796 seconds (process running for 1.253)
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.49 s - in com.example.demo.DemoApplicationTests
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ demo ---
[INFO] Building jar: /Users/anthonyd2/Downloads/starter/target/demo-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot:3.1.0:repackage (repackage) @ demo ---
[INFO] Replacing main artifact /Users/anthonyd2/Downloads/starter/target/demo-0.0.1-SNAPSHOT.jar with repackaged archive, adding nested dependencies in BOOT-INF/.
[INFO] The original artifact has been renamed to /Users/anthonyd2/Downloads/starter/target/demo-0.0.1-SNAPSHOT.jar.original
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.362 s
[INFO] Finished at: 2023-06-12T23:14:05-04:00
[INFO] ------------------------------------------------------------------------
[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-surefire-plugin:3.0.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
You'll notice the last lines
[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-surefire-plugin:3.0.0
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
Then, digging further into this warning:
./mvnw clean package -Dmaven.plugin.validation=VERBOSE
[...]
[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-surefire-plugin:3.0.0
[WARNING] Declared at location(s):
[WARNING] * org.springframework.boot:spring-boot-dependencies:3.1.0 (/Users/anthonyd2/.m2/repository/org/springframework/boot/spring-boot-dependencies/3.1.0/spring-boot-dependencies-3.1.0.pom) @ line 2588
[WARNING] Used in module(s):
[WARNING] * com.example:demo:0.0.1-SNAPSHOT (pom.xml)
[WARNING] Mojo issue(s):
[WARNING] * Mojo surefire:test (org.apache.maven.plugin.surefire.SurefirePlugin)
[WARNING] - Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead.
[WARNING]
[WARNING]
[WARNING] Fix reported issues by adjusting plugin configuration or by upgrading above listed plugins. If no upgrade available, please notify plugin maintainers about reported issues.
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
You'll notice this message:
[WARNING] Mojo issue(s):
[WARNING] * Mojo surefire:test (org.apache.maven.plugin.surefire.SurefirePlugin)
[WARNING] - Parameter 'systemProperties' is deprecated: Use systemPropertyVariables instead.
So, it looks like it's a maven-surefire-plugin issue, but still, it's disturbing to Spring Boot users I believe.
./mvnw -version
Apache Maven 3.9.2 (c9616018c7a021c1c39be70fb2843d6f5f9b8a1c)
Maven home: /Users/anthonyd2/.m2/wrapper/dists/apache-maven-3.9.2-bin/3238cb54/apache-maven-3.9.2
Java version: 17.0.6, vendor: BellSoft, runtime: /Users/anthonyd2/.sdkman/candidates/java/17.0.6-librca
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "13.4", arch: "aarch64", family: "mac"
Comment From: anthonydahanne
Happens with maven-surefire-plugin:3.1.2 as well
[WARNING]
[WARNING] Plugin validation issues were detected in 1 plugin(s)
[WARNING]
[WARNING] * org.apache.maven.plugins:maven-surefire-plugin:3.1.2
[WARNING]
[WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
[WARNING]
Comment From: snicoll
Thanks for the report but this is the wrong place to report this. Your project is using Native (and the native-maven-plugin has been configured). If you remove the plugin, the error goes away. I am going to close this now as there's nothing we can do here.
However I've reported the issue there as well so please subscribe for updates: https://github.com/graalvm/native-build-tools/issues/452