diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d146b7d..577a83c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,38 +1,52 @@ image: heeroyui/scenarium-gitlabci:latest -before_script: - - ls ~/javaFXSDK/javafx-sdk-14/lib - - ls ~ +variables: + MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode" + MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" + JAVA_TOOL_OPTIONS: "-Dfile.encoding=UTF8" + +cache: + paths: + - .m2/repository/ + - target/ stages: - style - build - test + - package style_job: stage: style script: - - export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 - - java -jar checkstyle.jar -c CheckStyle.xml `find src/ -name "*.java"` - - java -jar checkstyle.jar -c CheckStyle.xml `find test/src/ -name "*.java"` + - java -jar ~/checkstyle.jar -c CheckStyle.xml `find src/ -name "*.java"` + - java -jar ~/checkstyle.jar -c CheckStyle.xml `find test/src/ -name "*.java"` build_job: stage: build dependencies: - style_job script: - - export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 - - eval echo "~$USER" - - ant clean - - ant build + - mvn $MAVEN_CLI_OPTS compile test_job: stage: test dependencies: - build_job script: - - export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 - - ant clean build TestBasicLog + - mvn $MAVEN_CLI_OPTS test artifacts: reports: junit: junit/TEST-*.xml + +package_job: + stage: package + dependencies: + - test_job + script: + - mvn $MAVEN_CLI_OPTS package + artifacts: + when: on_success + expire_in: 1 day + paths: + - target/*.jar \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c02bf90 --- /dev/null +++ b/pom.xml @@ -0,0 +1,72 @@ + + 4.0.0 + scenarium-logger + scenarium-logger + 0.1.0 + Scenarium generic logger + + + + org.junit.jupiter + junit-jupiter-api + 5.6.2 + test + + + + src + test/src + + + test/src + + **/*.java + + + + + + + maven-compiler-plugin + 3.8.1 + + 14 + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + + prepare-agent + + + + + report + test + + report + + + + + + + \ No newline at end of file diff --git a/test/lib/junit-toolbox-2.4.jar b/test/lib/junit-toolbox-2.4.jar deleted file mode 100644 index 9550fe5..0000000 Binary files a/test/lib/junit-toolbox-2.4.jar and /dev/null differ diff --git a/test/src/test/scenarium/logger/TestBasicLog.java b/test/src/test/scenarium/logger/TestBasicLog.java index 451c091..c9dc41c 100644 --- a/test/src/test/scenarium/logger/TestBasicLog.java +++ b/test/src/test/scenarium/logger/TestBasicLog.java @@ -8,7 +8,7 @@ ******************************************************************************/ package test.scenarium.logger; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TestBasicLog {