I am trying to override the mainClass defined in pom.xml with command-line like this:
mvn spring-boot:run -Dspring-boot.run.main-class=some.other.class
but it does not work. The plugin runs the mainClass defined in pom.xml. I am using version 3.1.4 of spring-boot-maven-plugin. can anyone help with this?
Comment From: scottfrederick
This is standard Maven behavior - values in pom.xml override values provided on the command line. There is some discussion of this in #21536. The Maven plugin documentation shows a technique for overriding options from the command line yourself.
As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Please post any follow-up questions to Stack Overflow.