Merge pull request #43 from apache/feature/JCRVLT-476-sonarcloud

Feature/jcrvlt 476 sonarcloud
diff --git a/.travis.yml b/.travis.yml
index 7f0922e..68f6f9d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,6 +43,21 @@
     - JDK="adopt@1.8"
     - JDK="adopt@1.11"
     - JDK="adopt@1.14"
+jobs:
+  # for Java11 with linux include only one job which does sonar analysis as well as regular build
+  include:
+  - os: linux
+    env:
+       - JDK="adopt@1.11"
+       - SONARQUBE_EXECUTION=true
+  exclude:
+  - os: linux
+    env: JDK="adopt@1.11"
+addons:
+  sonarcloud:
+    organization: "apache"
+    token:
+      secure: "ftYinXGsk1HWv4lo6Iy/xIVO6ez/LYTF8Wv4VTPPsoJOU39Q78g9XusWqIiBSi3bKimrRD7U1oP5mVUGUafE2/8gaPSEnIHnAmUGdhQTMhtV1Ly97HOZfxj74vAb5gqXkT08GTaU0Juy1kcoLvG6AbxlQJEpqezgP/+yHley8VyFxx8b7y74xTJreZoD/LP1VM/rqXPA0q7199A7SnDteYtXLhHzib+GJ/xfOfwXzova3xIy24cThd15ZrOb18LYWrjs+21S049gQFXRFplKS1+fONz/khLpRrM2KeU+nMn8WWHkgjD7pZzP2hsT8eU7xN2XI3l821Dtbey715oyJhkqJwrt1qb0faPSstWANF74PB9HOeE13h+cUGTp+T0gGgsgXtkbvIQX2wC6I80k73GDwIMYrjjSfaBwtqfLOdHL9qm3fBBoq8f7ZYJjiOCcFgdbKWlo5APa0rIon4kkLzrQPgZtwiSKcW9GSVqEl6iQvxAZaLfgFuxLa7LP56HNz4uSPeXRXn737vUdMoNXIFGflA2P3zRFUcIXRAmfzqAU4w3EIYnYbTTpAOHEkjIg/SmRvxJ5I9zmzhCpIsEQIUFI4bSfzA8BrejhSU230hcvdsfWSBZbPbal4nrSFeUVliXciBLgcvfbPRam6Yv+nL0KGaZn0NZPwzngFh9tcM8="
 before_install:
   # Download the script
   - curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh
@@ -53,8 +68,12 @@
   - source ~/.install-maven.sh
 # This is your main script
 script:
-  # Just an example. Do what you deem useful
-  - mvn verify -B
+  - | 
+    if [ "$SONARQUBE_EXECUTION" == "true" ]; then
+        mvn clean verify sonar:sonar -B -Pjacoco-report -Dsonar.projectKey=apache_jackrabbit-filevault-package-maven-plugin
+    else
+      mvn clean verify -B
+    fi
 # If you use Gradle, cleanup the build cache from lock/temporary files
 before_cache:
   #- curl "${GRAVIS}.clean_gradle_cache.sh" --output ~/.clean_gradle_cache.sh
diff --git a/pom.xml b/pom.xml
index 3a0f59a..612eb74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
         <groupId>org.apache.jackrabbit.vault</groupId>
         <artifactId>parent</artifactId>
         <relativePath />
-        <version>3.4.6</version>
+        <version>3.4.7-SNAPSHOT</version>
     </parent>
 
     <!-- ====================================================================== -->
@@ -52,6 +52,8 @@
         <maven>${maven.version}</maven>
     </prerequisites>
 
+    <url>https://jackrabbit.apache.org/filevault-package-maven-plugin/</url>
+    
     <!-- ====================================================================== -->
     <!-- S C M  D E F I N I T I O N                                             -->
     <!-- ====================================================================== -->
diff --git a/src/test/resources/test-projects/default-test-projects/generic-unusal-jcrroot/pom.xml b/src/test/resources/test-projects/default-test-projects/generic-unusal-jcrroot/pom.xml
index 84e54c0..e5a29b6 100755
--- a/src/test/resources/test-projects/default-test-projects/generic-unusal-jcrroot/pom.xml
+++ b/src/test/resources/test-projects/default-test-projects/generic-unusal-jcrroot/pom.xml
@@ -51,6 +51,7 @@
                         </filter>
                     </filters>
                     <embeddedTarget>/apps/some-thirdparty-libs/install</embeddedTarget>
+                    <accessControlHandling>overwrite</accessControlHandling>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/src/test/resources/test-projects/default-test-projects/generic-with-builtcd/pom.xml b/src/test/resources/test-projects/default-test-projects/generic-with-builtcd/pom.xml
index aafec10..d751208 100755
--- a/src/test/resources/test-projects/default-test-projects/generic-with-builtcd/pom.xml
+++ b/src/test/resources/test-projects/default-test-projects/generic-with-builtcd/pom.xml
@@ -51,6 +51,7 @@
                         </filter>
                     </filters>
                     <embeddedTarget>/apps/some-thirdparty-libs/install</embeddedTarget>
+                    <accessControlHandling>overwrite</accessControlHandling>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/src/test/resources/test-projects/default-test-projects/generic-with-metainf/pom.xml b/src/test/resources/test-projects/default-test-projects/generic-with-metainf/pom.xml
index e374032..8e5bc5d 100755
--- a/src/test/resources/test-projects/default-test-projects/generic-with-metainf/pom.xml
+++ b/src/test/resources/test-projects/default-test-projects/generic-with-metainf/pom.xml
@@ -49,6 +49,7 @@
                         </embedded>
                     </embeddeds>
                     <embeddedTarget>/apps/install</embeddedTarget>
+                    <accessControlHandling>overwrite</accessControlHandling>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/src/test/resources/test-projects/default-test-projects/generic/pom.xml b/src/test/resources/test-projects/default-test-projects/generic/pom.xml
index 997e659..e013075 100755
--- a/src/test/resources/test-projects/default-test-projects/generic/pom.xml
+++ b/src/test/resources/test-projects/default-test-projects/generic/pom.xml
@@ -53,7 +53,7 @@
                             <root>/apps/some-thirdparty-libs</root>
                         </filter>
                     </filters>
-
+                    <accessControlHandling>overwrite</accessControlHandling>
                     <embeddeds>
                         <embedded>
                             <groupId>javax.jcr</groupId>
diff --git a/src/test/resources/test-projects/default-test-projects/resource/pom.xml b/src/test/resources/test-projects/default-test-projects/resource/pom.xml
index f2890c1..4b777ad 100755
--- a/src/test/resources/test-projects/default-test-projects/resource/pom.xml
+++ b/src/test/resources/test-projects/default-test-projects/resource/pom.xml
@@ -61,6 +61,7 @@
                         </filter>
                     </filters>
                     <embeddedTarget>/apps/some-thirdparty-libs/install</embeddedTarget>
+                    <accessControlHandling>overwrite</accessControlHandling>
                 </configuration>
             </plugin>
         </plugins>