I am working on a monorepo and it has a directory called apps with multiple services in it. These services depend on modules that live inside the lib directory of the monorepo. Whenever there is a change in the modules, I would ideally like only the relevant services to be built by maven, to create a war.
Is there a command that creates a war file only for that specific service? For e.g:
apps
|-foo
| |- pom.xml
|-bar
| |-pom.xml
|pom.xml
If I want maven to build war file for bar, is there a maven CLI command? I am using the following one currently for the entire application
mvn clean install -Dmaven.clean.failOnError=false