Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Java 9 Spring Boot application build throws RuntimeException using Maven #10647
Spring boot maven plugin is throwing RuntimeException during build for a Java 9 application. The issue occurs at org.springframework.asm.ClassVisitor:148 due to the api version used as ASM4. This api version is configured in the child class located at org.springframework.boot.loader.tools.MainClassFinder:301. Below are some of the details, please let me know if more is needed.
Maven Version: 3.5.0
This only occurs with
diff --git a/pom.xml b/pom.xml index 731b131..e2bd6ea 100644 --- a/pom.xml +++ b/pom.xml @@ -83,6 +83,9 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <mainClass>com.test.TestMain</mainClass> + </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId>
There are plenty of other potential problems that you may hit with Java 9 in module mode, many due to split packages in libraries in the Java ecosystem. You want want to stick with class path mode until things have had a chance to settle down.