August 2017
Beginner
298 pages
7h 26m
English
In order to execute the class with the main method as a Maven lifecycle, we use the exec-maven-plugin. This is also possible thanks to the configuration in the root project's pom.xml file. Here's the listing that specifies this configuration:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>${JAVA_HOME}/bin/java</executable>
<arguments>
<argument>--module-path</argument>
<modulepath/>
<argument>--module</argument>
<argument>packt.main/com.packt.App</argument>
</arguments>
</configuration>
</plugin>
As is typical with Maven configuration, ...
Read now
Unlock full access