Skip to content

Instantly share code, notes, and snippets.

View simonbrandhof's full-sized avatar

Simon Brandhof simonbrandhof

View GitHub Profile
@simonbrandhof
simonbrandhof / gist:7914401
Last active December 31, 2015 01:29
Quality profile used for the Java sources of SonarQube project. Note that some rules added in versions 4.0 or 4.1 are probably enabled. This file can be imported via the top-right link "Restore Profile" of the page "Quality Profiles".
<?xml version="1.0" encoding="UTF-8"?>
<profile><name>Default</name><language>java</language><rules><rule><repositoryKey>squid</repositoryKey><key>S1223</key><priority>MAJOR</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1318</key><priority>CRITICAL</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1312</key><priority>MAJOR</priority><parameters><parameter><key>format</key><value>LOG(?:GER)?</value></parameter></parameters></rule><rule><repositoryKey>squid</repositoryKey><key>S1319</key><priority>MAJOR</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1231</key><priority>MINOR</priority></rule><rule><repositoryKey>pmd</repositoryKey><key>CompareObjectsWithEquals</key><priority>MAJOR</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1217</key><priority>CRITICAL</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1219</key><priority>CRITICAL</priority></rule><rule><repositoryKey>squid</repositoryKey><key>S1210</key><priority>CRITICAL</p
@simonbrandhof
simonbrandhof / gist:1250223
Created September 29, 2011 07:51
Maven SCM cyclic dependencies
The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.apache.maven.plugins:maven-scm-plugin'}' and 'Vertex{label='org.apache.maven.scm:maven-scm-providers-standard'}' introduces to cycle in the graph org.apache.maven.scm:maven-scm-providers-standard --> org.apache.maven.scm:maven-scm-provider-integrity --> org.apache.maven.plugins:maven-scm-plugin --> org.apache.maven.scm:maven-scm-providers-standard
@simonbrandhof
simonbrandhof / gist:1044711
Created June 24, 2011 12:56
Build failure - xwiki platform
[INFO] XWiki Platform - WYSIWYG Editor - Parent POM ...... SUCCESS [7.399s]
[INFO] XWiki Platform - WYSIWYG Editor - Plugin API ...... SUCCESS [1:42.140s]
[INFO] XWiki Platform - WYSIWYG Editor - Client Side ..... SUCCESS [2:24.192s]
[INFO] XWiki Platform - WYSIWYG Editor - Server Side ..... SUCCESS [56.326s]
[INFO] XWiki Platform - WYSIWYG Editor - WAR Distribution FAILURE [2.319s]
[INFO] XWiki Platform - XML - Parent POM ................. SKIPPED
[INFO] XWiki Platform - XML - Script Service ............. SKIPPED
[INFO] XWiki Platform - XMLRPC - Client .................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Simon-Brandhofs-iMac:sonar simonbrandhof$ git status
# On branch master
# Your branch is behind 'origin/master' by 16 commits, and can be fast-forwarded.
#
nothing to commit (working directory clean)
Simon-Brandhofs-iMac:sonar simonbrandhof$ git lg
* 6642d7a - (HEAD, master) Upgrade to version 2.9-SNAPSHOT (6 days ago) <simonbrandhof>
* d7fad9e - Fix security issue in /reviews/show URL (7 days ago) <simonbrandhof>
* 4449f9b - Fix error log in webapp (7 days ago) <simonbrandhof>
* f2a0e5c - Fix display of source code in review detail (7 days ago) <simonbrandhof>
root :
<sonar:sonar_project key="foo" version="1.1">
<modules>
<path location="one"/>
<path location="two"/>
</modules>
</sonar:sonar_project>
modules :
public class SonarProjectTask extends Task {
private String key;
private String version;
public void setKey(String key) {
this.key = key;
}
public String getKey() {
return key;
<target name="sonar">
<sonar>
<sources>....</sources>
<module path="moduleA/build.xml" target="sonar"/>
<module path="moduleB/build.xml" target="sonar"/>
</sonar>