Add the Exec Maven Plugin

This allows execution of the Codegen class via `mvn exec:java`,
with optional args passed via `-Dexec.args="..."`:

mvn exec:java -Dexec.args="-i .../swagger.json -l html -o samples/..."
This commit is contained in:
James Earl Douglas 2014-12-18 10:55:47 -08:00
parent 45d5e480c0
commit 83699e5324

15
pom.xml
View File

@ -68,6 +68,21 @@
<directory>target</directory>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.wordnik.swagger.codegen.Codegen</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>