javavscode
javavscode copied to clipboard
Run configuration for spring-boot application
I have the following error trying to run a spring-boot application:
[ERROR]: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java (default-cli)
It runs fine on my local terminal with $mvn spring-boot:run.
After some searching I identified the issue in my pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
The application fails to run because the parent pom has set the provided flag. Only after removing the provided tag , the debuger works.
Is it posible to provide the missing dependencies from the launch configuration ? I do not want to have to change my pom every-time im going to run a service locally. I rather a launch configuration file aready set .
this is my launch configuration:
{
"type": "jdk",
"name": "Spring Boot App",
"request": "launch",
"cwd": "${workspaceFolder}",
"vmArgs": "-Dspring.boot.starter.tomcat.include=true",
"classPaths": [
"C://ws//libs//*"
]
}
PR link: https://github.com/apache/netbeans/pull/8289
This update ensures that now class-paths also support relative paths and star (*) expansion alongwith module-paths. We'd love to hear your feedback—does the experience with version 24.0.0 feel more intuitive now? Let us know if there are any remaining concerns or improvements you'd suggest!