How to force modules recompilation in multimodule SpringBoot maven project?

375 views Asked by At

There is a Maven project with two modules with this structure.

project
    moduleA
       pom.xml   // library 

    moduleB
       pom.xml   // SpringBoot application

    pom.xml      // parent aggregator

Module B depends on A.

When executing command mvn spring-boot:run -pl moduleB (from project folder) Maven takes compiled package moduleA.jar from local repository and fails if it is absent there.

Please, help me to find a way of forcing usage of the latest compiled moduleA version every time the moduleB application starts.

In perfect case I would like to avoid mvn install step, just inducing mvn compile (if code changed) or reusing a compiled moduleA; but it also works if somehow application could be started with the latest compiled version of all code in the multimodular project.

0

There are 0 answers