As far I'm concerned the install lifecycle will follow sequential lifecycles (according to the default lifecycle of maven) up to the install.
The problem is that in my multi-module project, it doesn't compile all modules as a default.
First of all, I bound the exec:java to the verify lifecycle. So when I do mvn clean install -Dexec.mainClass=com.ade.logic.ServerInitializer it only compiles the needed modules.
My project is composed of three modules (service, common and client_app). It only compiles service and common but no client_app.
As here:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] chat_app [pom]
[INFO] common [jar]
[INFO] service [jar]
[INFO] clientapp [jar]
[INFO]
[INFO] --------------------------< com.ade:chat_app >--------------------------
[INFO] Building chat_app 1.0-SNAPSHOT [1/4]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ chat_app ---
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ chat_app ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/pom.xml to /home/ade/.m2/repository/com/ade/chat_app/1.0-SNAPSHOT/chat_app-1.0-SNAPSHOT.pom
[INFO]
[INFO] ---------------------------< com.ade:common >---------------------------
[INFO] Building common 1.0-SNAPSHOT [2/4]
[INFO] from common/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ common ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ common ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/common/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ common ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 3 source files with javac [debug release 23] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ common ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/common/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ common ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 23] to target/test-classes
[INFO]
[INFO] --- surefire:3.2.5:test (default-test) @ common ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit.JUnit3Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.ade.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 s -- in com.ade.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.4.1:jar (default-jar) @ common ---
[INFO] Building jar: /home/ade/proyectos/proyectos_trabajando/chat_app/common/target/common-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ common ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/common/pom.xml to /home/ade/.m2/repository/com/ade/common/1.0-SNAPSHOT/common-1.0-SNAPSHOT.pom
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/common/target/common-1.0-SNAPSHOT.jar to /home/ade/.m2/repository/com/ade/common/1.0-SNAPSHOT/common-1.0-SNAPSHOT.jar
[INFO]
[INFO] --------------------------< com.ade:service >---------------------------
[INFO] Building service 1.0-SNAPSHOT [3/4]
[INFO] from service/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ service ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ service ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/service/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ service ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 4 source files with javac [debug release 23] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ service ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/service/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ service ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 23] to target/test-classes
[INFO]
[INFO] --- surefire:3.2.5:test (default-test) @ service ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit.JUnit3Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.ade.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.148 s -- in com.ade.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.4.1:jar (default-jar) @ service ---
[INFO] Building jar: /home/ade/proyectos/proyectos_trabajando/chat_app/service/target/service-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- exec:3.6.3:java (default) @ service ---
Therefore, if I check in the left modules it doesn't appear my target directory, this could be implies during the compile lifecycle, it doesn't compile my left module (client_app). I think it's because the binding exec-verify. Actually, if I unbound the exec-verify, it goes well (Everything it is compiled).
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.ade:service:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:exec-maven-plugin is missing. @ line 30, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] chat_app [pom]
[INFO] common [jar]
[INFO] service [jar]
[INFO] clientapp [jar]
[INFO]
[INFO] --------------------------< com.ade:chat_app >--------------------------
[INFO] Building chat_app 1.0-SNAPSHOT [1/4]
[INFO] from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ chat_app ---
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ chat_app ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/pom.xml to /home/ade/.m2/repository/com/ade/chat_app/1.0-SNAPSHOT/chat_app-1.0-SNAPSHOT.pom
[INFO]
[INFO] ---------------------------< com.ade:common >---------------------------
[INFO] Building common 1.0-SNAPSHOT [2/4]
[INFO] from common/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ common ---
[INFO] Deleting /home/ade/proyectos/proyectos_trabajando/chat_app/common/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ common ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/common/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ common ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 3 source files with javac [debug release 23] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ common ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/common/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ common ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 23] to target/test-classes
[INFO]
[INFO] --- surefire:3.2.5:test (default-test) @ common ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit.JUnit3Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.ade.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.090 s -- in com.ade.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.4.1:jar (default-jar) @ common ---
[INFO] Building jar: /home/ade/proyectos/proyectos_trabajando/chat_app/common/target/common-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ common ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/common/pom.xml to /home/ade/.m2/repository/com/ade/common/1.0-SNAPSHOT/common-1.0-SNAPSHOT.pom
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/common/target/common-1.0-SNAPSHOT.jar to /home/ade/.m2/repository/com/ade/common/1.0-SNAPSHOT/common-1.0-SNAPSHOT.jar
[INFO]
[INFO] --------------------------< com.ade:service >---------------------------
[INFO] Building service 1.0-SNAPSHOT [3/4]
[INFO] from service/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/maven-metadata.xml (1.1 kB at 1.0 kB/s)
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ service ---
[INFO] Deleting /home/ade/proyectos/proyectos_trabajando/chat_app/service/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ service ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/service/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ service ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 4 source files with javac [debug release 23] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ service ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/service/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ service ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 23] to target/test-classes
[INFO]
[INFO] --- surefire:3.2.5:test (default-test) @ service ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit.JUnit3Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.ade.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.138 s -- in com.ade.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.4.1:jar (default-jar) @ service ---
[INFO] Building jar: /home/ade/proyectos/proyectos_trabajando/chat_app/service/target/service-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ service ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/service/pom.xml to /home/ade/.m2/repository/com/ade/service/1.0-SNAPSHOT/service-1.0-SNAPSHOT.pom
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/service/target/service-1.0-SNAPSHOT.jar to /home/ade/.m2/repository/com/ade/service/1.0-SNAPSHOT/service-1.0-SNAPSHOT.jar
[INFO]
[INFO] -------------------------< com.ade:clientapp >--------------------------
[INFO] Building clientapp 1.0-SNAPSHOT [4/4]
[INFO] from clientapp/pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ clientapp ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ clientapp ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/clientapp/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ clientapp ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 2 source files with javac [debug release 23] to target/classes
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ clientapp ---
[INFO] skip non existing resourceDirectory /home/ade/proyectos/proyectos_trabajando/chat_app/clientapp/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ clientapp ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 23] to target/test-classes
[INFO]
[INFO] --- surefire:3.2.5:test (default-test) @ clientapp ---
[INFO] Using auto detected provider org.apache.maven.surefire.junit.JUnit3Provider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.ade.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 s -- in com.ade.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- jar:3.4.1:jar (default-jar) @ clientapp ---
[INFO] Building jar: /home/ade/proyectos/proyectos_trabajando/chat_app/clientapp/target/clientapp-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- install:3.1.2:install (default-install) @ clientapp ---
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/clientapp/pom.xml to /home/ade/.m2/repository/com/ade/clientapp/1.0-SNAPSHOT/clientapp-1.0-SNAPSHOT.pom
[INFO] Installing /home/ade/proyectos/proyectos_trabajando/chat_app/clientapp/target/clientapp-1.0-SNAPSHOT.jar to /home/ade/.m2/repository/com/ade/clientapp/1.0-SNAPSHOT/clientapp-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for chat_app 1.0-SNAPSHOT:
[INFO]
[INFO] chat_app ........................................... SUCCESS [ 0.638 s]
[INFO] common ............................................. SUCCESS [ 4.573 s]
[INFO] service ............................................ SUCCESS [ 3.569 s]
[INFO] clientapp .......................................... SUCCESS [ 1.601 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.658 s
[INFO] Finished at: 2025-12-29T19:06:50-06:00
[INFO] ------------------------------------------------------------------------
Thus, if the compile lifecycle was not bounded by the exec plugin but in the verify section, why in a some way attach to the compile lifecycle even it's past behind the verify lifecycle?
Proyect pom before unbound:
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ade</groupId>
<artifactId>chat_app</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>chat_app</name>
<url>http://maven.apache.org</url>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ade</groupId>
<artifactId>common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>common</module>
<module>service</module>
<module>clientapp</module>
</modules>
<properties>
<maven.compiler.release>23</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Service modules' pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ade</groupId>
<artifactId>chat_app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.ade</groupId>
<artifactId>service</artifactId>
<version>1.0-SNAPSHOT</version>
<name>service</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.ade</groupId>
<artifactId>common</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
common modules's pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ade</groupId>
<artifactId>chat_app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.ade</groupId>
<artifactId>common</artifactId>
<version>1.0-SNAPSHOT</version>
<name>common</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Client_app module's pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ade</groupId>
<artifactId>chat_app</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.ade</groupId>
<artifactId>clientapp</artifactId>
<version>1.0-SNAPSHOT</version>
<name>clientapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.ade</groupId>
<artifactId>common</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
Directories (all completed):
.
├── clientapp
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── ade
│ │ │ ├── gui
│ │ │ │ └── Menu.java
│ │ │ └── logic
│ │ │ └── DriverServer.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── ade
│ │ └── AppTest.java
│ └── target
│ ├── classes
│ │ └── com
│ │ └── ade
│ │ ├── gui
│ │ │ └── Menu.class
│ │ └── logic
│ │ └── DriverServer.class
│ ├── clientapp-1.0-SNAPSHOT.jar
│ ├── generated-sources
│ │ └── annotations
│ ├── generated-test-sources
│ │ └── test-annotations
│ ├── maven-archiver
│ │ └── pom.properties
│ ├── maven-status
│ │ └── maven-compiler-plugin
│ │ ├── compile
│ │ │ └── default-compile
│ │ │ ├── createdFiles.lst
│ │ │ └── inputFiles.lst
│ │ └── testCompile
│ │ └── default-testCompile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
│ ├── surefire-reports
│ │ ├── com.ade.AppTest.txt
│ │ └── TEST-com.ade.AppTest.xml
│ └── test-classes
│ └── com
│ └── ade
│ └── AppTest.class
├── common
│ ├── pom.xml
│ ├── src
│ │ ├── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── ade
│ │ │ └── utils
│ │ │ ├── Message.java
│ │ │ ├── Request.java
│ │ │ └── RequestType.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── ade
│ │ └── AppTest.java
│ └── target
│ ├── classes
│ │ └── com
│ │ └── ade
│ │ └── utils
│ │ ├── Message.class
│ │ ├── Request.class
│ │ └── RequestType.class
│ ├── common-1.0-SNAPSHOT.jar
│ ├── generated-sources
│ │ └── annotations
│ ├── generated-test-sources
│ │ └── test-annotations
│ ├── maven-archiver
│ │ └── pom.properties
│ ├── maven-status
│ │ └── maven-compiler-plugin
│ │ ├── compile
│ │ │ └── default-compile
│ │ │ ├── createdFiles.lst
│ │ │ └── inputFiles.lst
│ │ └── testCompile
│ │ └── default-testCompile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
│ ├── surefire-reports
│ │ ├── com.ade.AppTest.txt
│ │ └── TEST-com.ade.AppTest.xml
│ └── test-classes
│ └── com
│ └── ade
│ └── AppTest.class
├── pom.xml
└── service
├── pom.xml
├── src
│ ├── main
│ │ └── java
│ │ └── com
│ │ └── ade
│ │ └── logic
│ │ ├── RequestHandler.java
│ │ ├── RequestMessagePerformer.java
│ │ ├── ServerInitializer.java
│ │ └── Server.java
│ └── test
│ └── java
│ └── com
│ └── ade
│ └── AppTest.java
└── target
├── classes
│ └── com
│ └── ade
│ └── logic
│ ├── RequestHandler$1.class
│ ├── RequestHandler.class
│ ├── RequestMessagePerformer.class
│ ├── Server.class
│ └── ServerInitializer.class
├── generated-sources
│ └── annotations
├── generated-test-sources
│ └── test-annotations
├── maven-archiver
│ └── pom.properties
├── maven-status
│ └── maven-compiler-plugin
│ ├── compile
│ │ └── default-compile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
│ └── testCompile
│ └── default-testCompile
│ ├── createdFiles.lst
│ └── inputFiles.lst
├── service-1.0-SNAPSHOT.jar
├── surefire-reports
│ ├── com.ade.AppTest.txt
│ └── TEST-com.ade.AppTest.xml
└── test-classes
└── com
└── ade
└── AppTest.class
96 directories, 53 files
From the plugin docs (at the very end of the page):
Note: The java goal doesn't spawn a new process.
So what is happening is, when running maven install (running all lifecycles until install for all modules), when it reaches the service module, it runs the exec:java in the same process, so maven starts the java process and it won't continue the compilation until it returns.
Since you're likely starting a server, it will never halt/return, so maven just keeps waiting forever (that's why logs stops at exec:java). This is why it won't compile modules after this in the reactor. You can test by adding some continuous logging in your app, you'll see it never exits.
Remember that every module individually runs all lifecycle phases before maven goes to the next module. e.g: common -> clean/compile/install/verify then service -> clean/compile/install/verify only then to run client_app -> clean/compile/install/verify. Your current config gets you stuck at service verify because of the binding of exec-verify as you said.
I think you want to setup two different commands, one for running a specific module and another to compile/test all modules.
To do that, it's probably more confusing to declare the maven-exec-plugin at the root pom.xml, I suggest to declare it on application modules instead. If you have multiple application modules, declare on all of them. That should make more sense since they might use different configuration (like the main class for example), like so:
client_app/service/pom.xml
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<mainClass>com.ade.logic.ServerInitializer</mainClass>
</configuration>
</plugin>
</plugins>
</build>
...
Now, when you want to test all modules, you run mvn clean install.
And when you want to run service module you run mvn -am -pl :service compile exec:java. Exlaining the args:
-pl is --projects to specify the modules to run, in this case service module.-am is --also-make, means to also run the lifecycles on dependencies.compile in case you made changes to source code and exec:java to invoke the plugin on modules that declare it.This way you can avoid passing -Dexec.mainClass altogether, unless you want to.