diff --git a/integration-testing/pom.xml b/integration-testing/pom.xml index f377a3e6bb..45e0776142 100644 --- a/integration-testing/pom.xml +++ b/integration-testing/pom.xml @@ -88,21 +88,52 @@ - - kr.motd.maven - exec-maven-plugin + org.apache.maven.plugins + maven-assembly-plugin + + + assemble-all + package + + single + + + - ${java.home}/bin/java - - ${argLine.bootcp} - -classpath - %classpath - ${exampleClass} - ${argLine.example} - + + jar-with-dependencies + + + + com.internetitem + write-properties-file-maven-plugin + + + bootclasspath + prepare-package + + write-properties-file + + + bootclasspath.properties + ${project.build.directory} + + + bootclasspath + ${argLine.bootcp} + + + jar + ${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar + + + + + + - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index 730e478f7b..10e4de955a 100644 --- a/pom.xml +++ b/pom.xml @@ -290,6 +290,16 @@ maven-protoc-plugin 0.3.2 + + org.apache.maven.plugins + maven-assembly-plugin + 2.5.2 + + + com.internetitem + write-properties-file-maven-plugin + 1.0.1 + @@ -362,4 +372,4 @@ - \ No newline at end of file + diff --git a/run-test-client.sh b/run-test-client.sh index 75808fc84a..b126dcad20 100755 --- a/run-test-client.sh +++ b/run-test-client.sh @@ -3,6 +3,8 @@ TARGET='Test Service Client' TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceClient' TARGET_ARGS="$@" -cd "`dirname "$0"`"/integration-testing +cd "$(dirname "$0")" +mvn -q -nsu -pl integration-testing -am package -Dcheckstyle.skip=true -DskipTests +. integration-testing/target/bootclasspath.properties echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)" -exec mvn -q -nsu compile exec:exec -Dcheckstyle.skip=true -DexampleClass="$TARGET_CLASS" -DargLine.example="$TARGET_ARGS" \ No newline at end of file +exec java "$bootclasspath" -cp "$jar" "$TARGET_CLASS" $TARGET_ARGS diff --git a/run-test-server.sh b/run-test-server.sh index da14129eba..325c1d5771 100755 --- a/run-test-server.sh +++ b/run-test-server.sh @@ -3,6 +3,8 @@ TARGET='Test Service Server' TARGET_CLASS='com.google.net.stubby.testing.integration.TestServiceServer' TARGET_ARGS="$@" -cd "`dirname "$0"`"/integration-testing +cd "$(dirname "$0")" +mvn -q -nsu -pl integration-testing -am package -Dcheckstyle.skip=true -DskipTests +. integration-testing/target/bootclasspath.properties echo "[INFO] Running: $TARGET ($TARGET_CLASS $TARGET_ARGS)" -exec mvn -q -nsu compile exec:exec -Dcheckstyle.skip=true -DexampleClass="$TARGET_CLASS" -DargLine.example="$TARGET_ARGS" \ No newline at end of file +exec java "$bootclasspath" -cp "$jar" "$TARGET_CLASS" $TARGET_ARGS