add back pom and shell script for java play petstore

This commit is contained in:
wing328 2017-08-09 22:03:20 +08:00
parent 1e991be5f3
commit ce0dc64dd5
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,43 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>PlayServerTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>Play Petstore Server</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>Play Test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./sbt_test_jdk8_only.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,11 @@
#!/bin/bash
java -version 2>&1 | grep "java version \"1.8"
if [ $? -eq 0 ]
then
echo "Running JDK8"
sbt test
else
echo "Not running JDK8"
fi