From c54c64a85c253c524cb05dafda6cfefb30738a5d Mon Sep 17 00:00:00 2001
From: Mustapha Zorgati <15628173+mustaphazorgati@users.noreply.github.com>
Date: Tue, 21 Jan 2020 16:34:57 +0100
Subject: [PATCH] Revert "TSK-369: Cleanup sonarcloud configuration"
This reverts commit af7dee477339360670d7f8b9d7eae46a305b8c29.
---
.gitignore | 1 -
.travis.yml | 3 +-
ci/test.sh | 10 +-
coverage/pom.xml | 124 ++++++++++++++++++
pom.xml | 36 ++---
.../rest/ExampleRestApplicationTest.java | 17 ++-
sonar-project.properties | 3 +-
7 files changed, 153 insertions(+), 41 deletions(-)
create mode 100644 coverage/pom.xml
diff --git a/.gitignore b/.gitignore
index d7af20fb1..d6a777165 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,6 @@ node_modules/
# misc
/.sass-cache
/connect.lock
-/coverage
/libpeerconnection.log
npm-debug.log
testem.log
diff --git a/.travis.yml b/.travis.yml
index 26f1fdd18..660839502 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,10 +8,9 @@ jdk:
addons:
sonarcloud:
- organization: $SONAR_ORGANIZATION
+ organization: "benjamineckstein" # the key of the org you chose at step #3
git:
- #depth false needed by sonarcloud for deep comparison
depth: false
services:
diff --git a/ci/test.sh b/ci/test.sh
index face59f27..1dab3cf13 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -17,8 +17,6 @@ set -e # fail fast
#H - POSTGRES_10_4
#H module:
#H - HISTORY
-#H Optional:
-#H SONAR_PROJECT_KEY - configured in travis env
# Arguments:
# $1: exit code
function helpAndExit() {
@@ -34,12 +32,8 @@ function main() {
set -x
eval "$REL/prepare_db.sh '$1'"
# We can not use the fance '-f' maven option due to a bug in arquillian. See https://issues.jboss.org/browse/THORN-2049
- #-Pcoverage to activate jacoco and test coverage reports
- # #send test coverage and build information to sonarcloud
- (cd $REL/.. \
- && mvn -q install -B -T 4C -am -Pcoverage -Dmaven.javadoc.skip -Dcheckstyle.skip \
- && mvn sonar:sonar -Pcoverage -Dsonar.projectKey="$SONAR_PROJECT_KEY"
- )
+ (cd $REL/.. && mvn -q install -B -T 4C -am -Dmaven.javadoc.skip -Dcheckstyle.skip)
+ mvn sonar:sonar -Dsonar.projectKey=benjamineckstein_taskana
;;
DB2_10_5 | DB2_11_1)
set -x
diff --git a/coverage/pom.xml b/coverage/pom.xml
new file mode 100644
index 000000000..5a5bc249a
--- /dev/null
+++ b/coverage/pom.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ pro.taskana
+ taskana-parent
+ 1.2.1-SNAPSHOT
+ ../pom.xml
+
+ 4.0.0
+
+ taskana-coverage
+
+ ${project.groupId}:${project.artifactId}
+ http://maven.apache.org
+
+
+
+
+ pro.taskana
+ taskana-cdi
+ ${project.version}
+
+
+
+ pro.taskana
+ taskana-core
+ ${project.version}
+
+
+ pro.taskana
+ taskana-data
+ ${project.version}
+
+
+ pro.taskana
+ taskana-spring
+ ${project.version}
+
+
+ pro.taskana
+ taskana-spring-example
+ ${project.version}
+
+
+ pro.taskana
+ taskana-rest-spring
+ ${project.version}
+
+
+ pro.taskana
+ taskana-rest-spring-example-boot
+ ${project.version}
+
+
+ pro.taskana
+ taskana-rest-spring-example-common
+ ${project.version}
+
+
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${version.jacoco}
+
+
+
+ aggregate-reports-ut
+ install
+
+ report-aggregate
+
+
+ Maven Multimodule Coverage Demo: Coverage of Unit Tests
+ **/jacoco.exec
+ ${project.reporting.outputDirectory}/jacoco-aggregate
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 959092420..72bc169cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,6 +15,7 @@
rest
history
+ coverage
@@ -81,8 +82,6 @@
1.4.197
11.1.1.1
42.2.9
-
-
@@ -217,26 +216,6 @@
-
- coverage
-
-
-
- org.jacoco
- jacoco-maven-plugin
- ${version.jacoco}
-
-
-
- prepare-agent
- report
-
-
-
-
-
-
-
@@ -257,6 +236,19 @@
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${version.jacoco}
+
+
+
+ prepare-agent
+ report
+
+
+
+
org.apache.maven.plugins
maven-compiler-plugin
diff --git a/rest/taskana-rest-spring-example-boot/src/test/pro/taskana/rest/ExampleRestApplicationTest.java b/rest/taskana-rest-spring-example-boot/src/test/pro/taskana/rest/ExampleRestApplicationTest.java
index 9a0d03f40..268bc0ee9 100644
--- a/rest/taskana-rest-spring-example-boot/src/test/pro/taskana/rest/ExampleRestApplicationTest.java
+++ b/rest/taskana-rest-spring-example-boot/src/test/pro/taskana/rest/ExampleRestApplicationTest.java
@@ -3,12 +3,15 @@ package pro.taskana.rest;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
-/** Placeholder test class until we have real tests. */
+/**
+ * Placeholder test class until we have real tests.
+ */
class ExampleRestApplicationTest {
- /** TODO add real tests */
- @Test
- void sampleTest() {
- Assertions.assertTrue(true);
- }
-}
+ /** TODO add real tests */
+ @Test
+ void sampleTest() {
+ Assertions.assertTrue(true);
+
+ }
+}
\ No newline at end of file
diff --git a/sonar-project.properties b/sonar-project.properties
index 01e784135..e47ca560e 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -1,4 +1,5 @@
+sonar.projectKey=benjamineckstein_taskana
sonar.java.coveragePlugin=jacoco
sonar.jacoco.reportPath=**/jacoco.*
-sonar.dynamicAnalysis=reuseReports
+sonar.dynamicAnalysis=reuseReports
\ No newline at end of file