-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
414 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Exit as soon as a command return status != 0 | ||
set -e | ||
|
||
SRC_DIR=/project/target | ||
TARGET_DIR=/project/target/jars | ||
|
||
# Create target dir | ||
mkdir -p ${TARGET_DIR} | ||
|
||
cd ${SRC_DIR} | ||
|
||
# Build the project: create all the jar files | ||
mvn clean install jar:test-jar -DskipTests | ||
# Copy the jar files into the target directory | ||
find ${SRC_DIR} -name "*.jar" -not -path "${TARGET_DIR}/*" -exec cp {} ${TARGET_DIR} \; | ||
# Copy all the dependencies into the target directory | ||
mvn dependency:copy-dependencies -DoutputDirectory=${TARGET_DIR} | ||
|
||
# Clean all except jars | ||
shopt -s extglob | ||
rm -rf !("jars") | ||
|
||
# Clean .m2 directory | ||
#!/bin/bash | ||
|
||
# Exit as soon as a command return status != 0 | ||
set -e | ||
|
||
SRC_DIR=/project/target | ||
TARGET_DIR=/project/target/jars | ||
|
||
# Create target dir | ||
mkdir -p ${TARGET_DIR} | ||
|
||
cd ${SRC_DIR} | ||
|
||
# Build the project: create all the jar files | ||
mvn clean install jar:test-jar -DskipTests | ||
# Copy the jar files into the target directory | ||
find ${SRC_DIR} -name "*.jar" -not -path "${TARGET_DIR}/*" -exec cp {} ${TARGET_DIR} \; | ||
# Copy all the dependencies into the target directory | ||
mvn dependency:copy-dependencies -DoutputDirectory=${TARGET_DIR} | ||
|
||
# Clean all except jars | ||
shopt -s extglob | ||
rm -rf !("jars") | ||
|
||
# Clean .m2 directory | ||
rm -rf ${HOME}/.m2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
#!/bin/bash | ||
# Can be invoked as: | ||
# xxx.sh SOURCE_DIR TestClass | ||
# xxx.sh SOURCE_DIR TestClass#testMethod | ||
# xxx.sh TestClass | ||
# xxx.sh TestClass#testMethod | ||
|
||
compilationExitCode=0 | ||
executionExitCode=0 | ||
|
||
JARS_DIR="/project/target/jars" | ||
WORKSPACE_DIR="/project/workspace" | ||
|
||
cd /project/target | ||
|
||
classpath=$(echo ${JARS_DIR}/*.jar | tr ' ' ':') | ||
|
||
SOURCE_DIR=$(pwd) | ||
|
||
if [ "$#" == "2" ]; then | ||
SOURCE_DIR=$(pwd)/$1 | ||
shift | ||
fi | ||
|
||
cd ${SOURCE_DIR} || echo "Could not find directory ${SOURCE_DIR}" && exit 1 | ||
|
||
find * -name "*.kt" -print0 | xargs -0 /opt/techio/k2/K2JVMCompiler org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -no-stdlib -cp "$classpath" -d "${WORKSPACE_DIR}" | ||
compilationExitCode=$? | ||
|
||
if [ $compilationExitCode -eq 0 ]; then | ||
java -cp "${WORKSPACE_DIR}:$classpath:/opt/techio/junit-runner/junit-runner.jar" io.tech.runner.junit.JUnitTestListRunner $1 | ||
else | ||
exit $compilationExitCode | ||
fi | ||
#!/bin/bash | ||
# Can be invoked as: | ||
# xxx.sh SOURCE_DIR TestClass | ||
# xxx.sh SOURCE_DIR TestClass#testMethod | ||
# xxx.sh TestClass | ||
# xxx.sh TestClass#testMethod | ||
|
||
compilationExitCode=0 | ||
executionExitCode=0 | ||
|
||
JARS_DIR="/project/target/jars" | ||
WORKSPACE_DIR="/project/workspace" | ||
|
||
cd /project/target | ||
|
||
classpath=$(echo ${JARS_DIR}/*.jar | tr ' ' ':') | ||
|
||
SOURCE_DIR=$(pwd) | ||
|
||
if [ "$#" == "2" ]; then | ||
SOURCE_DIR=$(pwd)/$1 | ||
shift | ||
fi | ||
|
||
cd ${SOURCE_DIR} || echo "Could not find directory ${SOURCE_DIR}" && exit 1 | ||
|
||
find * -name "*.kt" -print0 | xargs -0 /opt/techio/k2/K2JVMCompiler org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -no-stdlib -cp "$classpath" -d "${WORKSPACE_DIR}" | ||
compilationExitCode=$? | ||
|
||
if [ $compilationExitCode -eq 0 ]; then | ||
java -cp "${WORKSPACE_DIR}:$classpath:/opt/techio/junit-runner/junit-runner.jar" io.tech.runner.junit.JUnitTestListRunner $1 | ||
else | ||
exit $compilationExitCode | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<settings> | ||
<mirrors> | ||
<mirror> | ||
<!--This sends everything else to /public --> | ||
<id>nexus</id> | ||
<mirrorOf>central</mirrorOf> | ||
<url>https://nexus.codingame.com/repository/maven-central/</url> | ||
</mirror> | ||
</mirrors> | ||
<settings> | ||
<mirrors> | ||
<mirror> | ||
<!--This sends everything else to /public --> | ||
<id>nexus</id> | ||
<mirrorOf>central</mirrorOf> | ||
<url>https://nexus.codingame.com/repository/maven-central/</url> | ||
</mirror> | ||
</mirrors> | ||
</settings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,83 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.tech.runner</groupId> | ||
<artifactId>maven3-junit4-runner</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>1.3.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>3.6.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>2.6.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-core</artifactId> | ||
<version>3.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-unit</artifactId> | ||
<version>3.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.5.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>io.tech.runner.junit.JUnitTestListRunner</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>io.tech.runner</groupId> | ||
<artifactId>maven3-junit4-runner</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>1.3.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<version>3.6.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>2.6.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-core</artifactId> | ||
<version>3.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-unit</artifactId> | ||
<version>3.0.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.5.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>io.tech.runner.junit.JUnitTestListRunner</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.