Skip irrelevant modules when using Sonarqube 5.x
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Fri, 22 Apr 2016 21:33:09 +0000 (17:33 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Sat, 30 Apr 2016 23:21:55 +0000 (19:21 -0400)
sonar.skippedModules is depracated and will not work in more recent
versions of Sonarqube. We can define sonar.skip in respective modules
instead. Both properties can be defined without problem. To preserve
the pom-less build, a new profile is activated in the presence of the
sonar.skip.properties file. So each module we do not want to analyse
with maven have to contain this file.

Change-Id: I6bf8115540744e48a9431f63ba96c504917f35e3
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71270
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
ctf/org.eclipse.tracecompass.ctf.parser/sonar.skip.properties [new file with mode: 0644]
doc/org.eclipse.tracecompass.examples/sonar.skip.properties [new file with mode: 0644]
pom.xml

diff --git a/ctf/org.eclipse.tracecompass.ctf.parser/sonar.skip.properties b/ctf/org.eclipse.tracecompass.ctf.parser/sonar.skip.properties
new file mode 100644 (file)
index 0000000..1673000
--- /dev/null
@@ -0,0 +1 @@
+# This file tells the Maven build to skip sonar analysis
diff --git a/doc/org.eclipse.tracecompass.examples/sonar.skip.properties b/doc/org.eclipse.tracecompass.examples/sonar.skip.properties
new file mode 100644 (file)
index 0000000..1673000
--- /dev/null
@@ -0,0 +1 @@
+# This file tells the Maven build to skip sonar analysis
diff --git a/pom.xml b/pom.xml
index 8ed77ff05b02568c788a01fbcb69c278ef436450..2121b4a0e495f05911509ac0951806adb2531895 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         </plugins>
       </build>
     </profile>
+
+    <!-- Automatic profile to skip sonar -->
+    <profile>
+      <id>skip-sonar</id>
+      <activation>
+        <file>
+          <exists>sonar.skip.properties</exists>
+        </file>
+      </activation>
+      <properties>
+        <sonar.skip>true</sonar.skip>
+      </properties>
+    </profile>
   </profiles>
 
   <modules>
This page took 0.027669 seconds and 5 git commands to generate.