Enabling Maven Profile gen-scalatra

This commit is contained in:
Bernardo Gomez Palacio 2014-10-14 14:24:59 -07:00
parent 7c998a2d67
commit b2f34a152b

49
pom.xml
View File

@ -191,7 +191,7 @@
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>
<version>2.1</version> <version>2.1</version>
</plugin> </plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
@ -290,6 +290,51 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>gen-scalatra</id>
<activation>
<property>
<name>template</name>
<value>scalatra</value>
</property>
</activation>
<build>
<defaultGoal>compile exec:java</defaultGoal>
<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>
<executable>java</executable>
<mainClass>com.wordnik.swagger.codegen.Codegen</mainClass>
<arguments>
<argument>-l</argument>
<argument>scalatra</argument>
<argument>-i</argument>
<argument>${swagger-spec}</argument>
<argument>-t</argument>
<argument>${swagger-template}</argument>
<argument>-o</argument>
<argument>${swagger-out}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<swagger-spec>samples/yaml/echo.yaml</swagger-spec>
<swagger-template>src/main/resources/scalatra</swagger-template>
<swagger-out>generated-code/scalatra</swagger-out>
</properties>
</profile>
</profiles> </profiles>
<reporting> <reporting>
<outputDirectory>target/site</outputDirectory> <outputDirectory>target/site</outputDirectory>
@ -342,7 +387,6 @@
<version>${swagger-core-version}</version> <version>${swagger-core-version}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.samskivert</groupId> <groupId>com.samskivert</groupId>
<artifactId>jmustache</artifactId> <artifactId>jmustache</artifactId>
@ -408,7 +452,6 @@
<scala-test-version>2.1.4</scala-test-version> <scala-test-version>2.1.4</scala-test-version>
<commons-io-version>2.3</commons-io-version> <commons-io-version>2.3</commons-io-version>
<commons-cli-version>1.2</commons-cli-version> <commons-cli-version>1.2</commons-cli-version>
<junit-version>4.8.1</junit-version> <junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version> <maven-plugin-version>1.0.0</maven-plugin-version>
<commons-lang-version>2.4</commons-lang-version> <commons-lang-version>2.4</commons-lang-version>