0

Assuming my multi module gradle project structure looks like this:

MainModule
    |
    + application 
    |
    + ... (other modules)

The application module contains a class annotated with @SpringBootApplication and when I'm in this directory (MainModule/application) I can run

gradle bootRun (at MainModule/application)

and the application is working fine.

But now i want to be able to start the application with gradle from the parent directory (MultiModule). How can I do this? I would like to achieve the same result using

gradle bootRun (at MainModule)

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
thomasso
  • 280
  • 1
  • 5
  • 12

1 Answers1

2

In Gradle you can address tasks by using a path expression:

gradle application:bootRun
tobiasH
  • 411
  • 5
  • 11