aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Grebac2014-08-01 13:13:09 (EDT)
committerTomas Kraus2014-08-01 13:48:40 (EDT)
commit1f277b4752ed183e91db68eedceed7b56033a79f (patch)
tree2624ae596766ad67a1bb91b1c819bb0bb95a4a3c
parent80d0b9553a02c77790e01497a4f4599d95d2f135 (diff)
downloadeclipselink.runtime-1f277b4752ed183e91db68eedceed7b56033a79f.zip
eclipselink.runtime-1f277b4752ed183e91db68eedceed7b56033a79f.tar.gz
eclipselink.runtime-1f277b4752ed183e91db68eedceed7b56033a79f.tar.bz2
Bug# 441001 - Add sonar config to the project to allow easy local or hudson sonar run, allow findbugs invocation like this: ant -f antbuild.xml build -Dmaven.goals="verify findbugs:findbugs"
Signed-off-by: Martin Grebac <martin.grebac@oracle.com>
-rw-r--r--antbuild.xml13
-rw-r--r--buildsystem/org.eclipse.persistence.parent/pom.xml32
-rw-r--r--sonar-project.properties38
3 files changed, 61 insertions, 22 deletions
diff --git a/antbuild.xml b/antbuild.xml
index 8e38345..1149c5f 100644
--- a/antbuild.xml
+++ b/antbuild.xml
@@ -133,6 +133,9 @@
<fail message="An non-compatible version of JDK was detected! Build won't run properly unless running at least 1.6 of JDK!." unless="compat.jdk"/>
<echo message="JDBC driver JAR: '${jdbc.driver.jar}'"/>
+ <!-- controls which goals to invoke with maven (default is 'verify') -->
+ <property name="maven.goals" value="verify"/>
+
<!-- versioning -->
<!-- These variables are set in autobuild.xml. A manual build gets defaults -->
<tstamp>
@@ -336,7 +339,7 @@
<echo message=" -DforceContextQualifier=${version.qualifier}"/>
<echo message=" -Dlocal.compdeps=${local.compdeps}"/>
<echo message=" -Declipselink.full=true"/>
- <echo message=" verify"/>
+ <echo message=" ${maven.goals}"/>
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
@@ -344,8 +347,7 @@
<jvmarg value="-DforceContextQualifier=${version.qualifier}"/>
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-Declipselink.full=true"/>
- <!--<arg value="-X"/>-->
- <arg value="verify"/>
+ <arg line="${maven.goals}"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
@@ -444,7 +446,7 @@
<echo message=" -Dlocal.compdeps=${local.compdeps}"/>
<echo message=" -D${oracle.target}=true"/>
<echo message=" -Doracle.p2.url=${oracle.p2.url}"/>
- <echo message=" verify"/>
+ <echo message=" ${maven.goals}"/>
<java dir="${eclipselink.mvn.parent}" fork="true" failonerror="true" classname="org.codehaus.plexus.classworlds.launcher.Launcher">
<jvmarg value="-Dclassworlds.conf=${M2_HOME}/bin/m2.conf"/>
<jvmarg value="-Dmaven.home=${M2_HOME}"/>
@@ -453,8 +455,7 @@
<jvmarg value="-Dlocal.compdeps=${local.compdeps}"/>
<jvmarg value="-D${oracle.target}=true"/>
<jvmarg value="-Doracle.p2.url=${oracle.p2.url}"/>
- <!-- arg value="-X"/ -->
- <arg value="verify"/>
+ <arg line="${maven.goals}"/>
<classpath>
<fileset dir="${M2_HOME}/boot">
<include name="plexus-classworlds-*.jar"/>
diff --git a/buildsystem/org.eclipse.persistence.parent/pom.xml b/buildsystem/org.eclipse.persistence.parent/pom.xml
index c465b5e..9a525b6 100644
--- a/buildsystem/org.eclipse.persistence.parent/pom.xml
+++ b/buildsystem/org.eclipse.persistence.parent/pom.xml
@@ -36,6 +36,7 @@
<orbit.drop>R20130827064939</orbit.drop>
<!-- orbit.drop>R20130517111416</orbit.drop -->
<eclipse.drop>kepler</eclipse.drop>
+ <findbugs.threshold>High</findbugs.threshold>
</properties>
<!-- Default modules set and added to by all profiles -->
@@ -325,20 +326,19 @@
</testResources>
<finalName>${project.artifactId}_${release.version}.${build.qualifier}</finalName>
</build>
-
- <!-- pluginRepositories>
- <pluginRepository>
- <id>tycho-0.16.0-staged</id>
- <url>https://oss.sonatype.org/content/repositories/orgeclipsetycho-207/</url>
- </pluginRepository>
- <pluginRepository>
- <id>tycho-public</id>
- <url>https://oss.sonatype.org/content/groups/public/</url>
- </pluginRepository>
- <pluginRepository>
- <id>maven-eclipse</id>
- <url>http://repo1.maven.org</url>
- </pluginRepository>
- </pluginRepositories -->
-
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.5.2</version>
+ <configuration>
+ <effort>Max</effort>
+ <threshold>${findbugs.threshold}</threshold>
+ <htmlOutput>true</htmlOutput>
+ <xmlOutput>true</xmlOutput>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
diff --git a/sonar-project.properties b/sonar-project.properties
new file mode 100644
index 0000000..fa896c8
--- /dev/null
+++ b/sonar-project.properties
@@ -0,0 +1,38 @@
+sonar.projectKey=eclipselink:project
+sonar.projectName=EclipseLink
+sonar.projectVersion=2.6.0
+
+# Path to the parent source code directory.
+# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
+# Since SonarQube 4.2, this property is optional. If not set, SonarQube starts looking for source code
+# from the directory containing the sonar-project.properties file.
+sonar.sources=src
+
+# modules
+sonar.modules=core, core-extension, core-nosql, core-oracle, core-oracle-nosql, dbws, jpa, jpa-jpql, jpa-modelgen, jpa-jpars, moxy, moxy-dynamic, sdo, utils-rename, utils-jaxb, utils-sigcompare
+
+# foundation
+core.sonar.projectBaseDir=foundation/org.eclipse.persistence.core
+core-extension.sonar.projectBaseDir=foundation/org.eclipse.persistence.extension
+core-nosql.sonar.projectBaseDir=foundation/org.eclipse.persistence.nosql
+core-oracle.sonar.projectBaseDir=foundation/org.eclipse.persistence.oracle
+core-oracle-nosql.sonar.projectBaseDir=foundation/org.eclipse.persistence.oracle.nosql
+#dbws
+dbws.sonar.projectBaseDir=dbws/org.eclipse.persistence.dbws
+#jpa
+jpa.sonar.projectBaseDir=jpa/org.eclipse.persistence.jpa
+jpa-jpql.sonar.projectBaseDir=jpa/org.eclipse.persistence.jpa.jpql
+jpa-modelgen.sonar.projectBaseDir=jpa/org.eclipse.persistence.jpa.modelgen
+jpa-jpars.sonar.projectBaseDir=jpa/org.eclipse.persistence.jpars
+#moxy
+moxy.sonar.projectBaseDir=moxy/org.eclipse.persistence.moxy
+moxy-dynamic.sonar.projectBaseDir=moxy/org.eclipse.persistence.moxy.dynamicxjc
+#sdo
+sdo.sonar.projectBaseDir=sdo/org.eclipse.persistence.sdo
+#utils
+utils-jaxb.sonar.projectBaseDir=utils/eclipselink.utils.jaxb
+utils-rename.sonar.projectBaseDir=utils/eclipselink.utils.rename
+utils-sigcompare.sonar.projectBaseDir=utils/eclipselink.utils.sigcompare
+
+# Encoding of the source code
+sonar.sourceEncoding=UTF-8