]> source.dussan.org Git - sonarqube.git/commitdiff
Add script find-classpath-conflicts.sh
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 16 Mar 2015 13:09:09 +0000 (14:09 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 16 Mar 2015 13:11:50 +0000 (14:11 +0100)
find-classpath-conflicts.sh [new file with mode: 0644]
pom.xml
run.sh [deleted file]

diff --git a/find-classpath-conflicts.sh b/find-classpath-conflicts.sh
new file mode 100644 (file)
index 0000000..866de0e
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Search for duplication of classes in classpath
+# This check can not be automated in build yet as current
+# conflicts must be fixed.
+
+mvn org.basepom.maven:duplicate-finder-maven-plugin:check
diff --git a/pom.xml b/pom.xml
index b52201d8516ab7867720ff36f61dc6173b12220d..d9f2c1cb17277d806f0f2c8e200d5ef4591f6413 100644 (file)
--- a/pom.xml
+++ b/pom.xml
             <suppressionFile>cve-false-positives.xml</suppressionFile>
           </configuration>
         </plugin>
-
+        <plugin>
+          <!--
+          Detection of conflicts in classpath.
+          Command line is: mvn org.basepom.maven:duplicate-finder-maven-plugin:check
+          See https://github.com/basepom/duplicate-finder-maven-plugin
+          -->
+          <groupId>org.basepom.maven</groupId>
+          <artifactId>duplicate-finder-maven-plugin</artifactId>
+          <version>1.1.0</version>
+          <configuration>
+            <printEqualFiles>true</printEqualFiles>
+            <!--
+            <failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
+            <failBuildInCaseOfEqualContentConflict>true</failBuildInCaseOfEqualContentConflict>
+            <failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
+            -->
+            <checkCompileClasspath>true</checkCompileClasspath>
+            <checkRuntimeClasspath>true</checkRuntimeClasspath>
+            <checkTestClasspath>false</checkTestClasspath>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
 
diff --git a/run.sh b/run.sh
deleted file mode 100755 (executable)
index 6ea64a1..0000000
--- a/run.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-if [[ "$OSTYPE" == "darwin"* ]]; then
-  OS='macosx-universal-64'
-else
-  OS='linux-x86-64'
-fi
-
-if ! ls sonar-application/target/sonarqube-*.zip &> /dev/null; then
-  echo 'Sources are not built'
-  ./build.sh
-fi
-
-cd sonar-application/target/
-if ! ls sonarqube-*/bin/$OS/sonar.sh &> /dev/null; then
-  unzip sonarqube-*.zip
-fi
-cd sonarqube-*
-bin/$OS/sonar.sh restart
-echo "sonar.search.http.port=9200" >>  conf/sonar.properties
-sleep 1
-tail -100f logs/sonar.log