1. Introduction
This project contains example of exec-maven-plugin
usage
Project generated by generator-jvm yeoman generator (java)
2. Implementation
java example
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class App {
public static void main(String[] args) {
log.info("yo!");
}
}
plugion configuration
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<!-- configuration 1:
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>daggerok.App</argument>
</arguments>
</configuration>
-->
<!-- configuration 2:
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath>
<dependency/>
</classpath>
<argument>daggerok.App</argument>
</arguments>
</configuration>
-->
<!-- configuration 3: -->
<configuration>
<skip>false</skip>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath>
<dependency>org.slf4j:slf4j-api</dependency>
<dependency>ch.qos.logback:logback-core</dependency>
<dependency>ch.qos.logback:logback-classic</dependency>
</classpath>
<argument>daggerok.App</argument>
</arguments>
</configuration>
<executions>
<execution>
<id>exec</id>
<goals>
<goal>exec</goal>
</goals>
<phase>integration-test</phase>
</execution>
</executions>
</plugin>
</plugins>
<defaultGoal>clean integration-test</defaultGoal>
</build>
</project>