0

Currently, I am trying to learn how to use Maven properly. So I found a Spring Boot Tutorial and there is the following command:

mvn package && java -jar target/gs-spring-boot-0.1.0.jar

This command works in the Windows Shell, but unfortunately, not in Eclipse (newest MARS version). How do I have to rewrite the goal to get it working?

Sean Mickey
  • 7,618
  • 2
  • 32
  • 58
A.M.
  • 69
  • 1
  • 7

2 Answers2

0

According to the Spring Boot Maven Plugin Docs, there is a run goal that you can leverage to execute spring-boot programs.

For non spring boot programs, I would defer to the usage of maven exec.

The shell command in your question is pretty much confined to shell usage only; though I'm sure you can find a plugin for eclipse to run shell commands.

Community
  • 1
  • 1
Brandon McKenzie
  • 1,655
  • 11
  • 26
0

Found it out myself. There is a command, which includes both: the maven and the java command. It works for spring applications. I used

spring-boot:run

as goal.

A.M.
  • 69
  • 1
  • 7