Skip to content

Commit

Permalink
INT-3021 - Fix Sonar Build Plan
Browse files Browse the repository at this point in the history
* Upgrade to gradle 1.6
* Switch from sonar plugin to sonarRunner plugin

INT-3021 - Correct SCM syntax
  • Loading branch information
ghillert authored and garyrussell committed May 23, 2013
1 parent d649a9f commit 955e3ee
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 39 deletions.
51 changes: 20 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ buildscript {
}
}

ext {
linkHomepage = 'http://www.springintegration.org/'
linkCi = 'https://build.springsource.org/browse/INT'
linkIssue = 'https://jira.springsource.org/browse/INT'
linkScmUrl = 'https://github.com/SpringSource/spring-integration'
linkScmConnection = 'git://github.com/SpringSource/spring-integration.git'
linkScmDevConnection = 'git@github.com:SpringSource/spring-integration.git'
}

allprojects {
group = 'org.springframework.integration'

Expand Down Expand Up @@ -595,38 +604,18 @@ reference {
sourceDir = file('src/reference/docbook')
}

apply plugin: 'sonar'
apply plugin: 'sonar-runner'

sonar {

if (rootProject.hasProperty('sonarHostUrl')) {
server.url = rootProject.sonarHostUrl
sonarRunner {
sonarProperties {
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
property "sonar.links.homepage", linkHomepage
property "sonar.links.ci", linkCi
property "sonar.links.issue", linkIssue
property "sonar.links.scm", linkScmUrl
property "sonar.links.scm_dev", linkScmDevConnection
property "sonar.java.coveragePlugin", "jacoco"
}

database {
if (rootProject.hasProperty('sonarJdbcUrl')) {
url = rootProject.sonarJdbcUrl
}
if (rootProject.hasProperty('sonarJdbcDriver')) {
driverClassName = rootProject.sonarJdbcDriver
}
if (rootProject.hasProperty('sonarJdbcUsername')) {
username = rootProject.sonarJdbcUsername
}
if (rootProject.hasProperty('sonarJdbcPassword')) {
password = rootProject.sonarJdbcPassword
}
}

project {
dynamicAnalysis = "reuseReports"
withProjectProperties { props ->
props["sonar.core.codeCoveragePlugin"] = "jacoco"
props["sonar.jacoco.reportPath"] = "${buildDir.name}/jacoco.exec"
}
}

logger.info("Sonar parameters used: server.url='${server.url}'; database.url='${database.url}'; database.driverClassName='${database.driverClassName}'; database.username='${database.username}'")
}

task api(type: Javadoc) {
Expand Down Expand Up @@ -769,5 +758,5 @@ task dist(dependsOn: assemble) {

task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.5'
gradleVersion = '1.6'
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Apr 11 15:10:59 EDT 2013
zipStoreBase=GRADLE_USER_HOME
distributionUrl=http\://services.gradle.org/distributions/gradle-1.5-bin.zip
distributionPath=wrapper/dists
#Thu May 16 22:49:11 EDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
9 changes: 5 additions & 4 deletions publish-maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def customizePom(pom, gradleProject) {
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
url = 'https://github.com/SpringSource/spring-integration'
url = linkHomepage
organization {
name = 'SpringSource'
url = 'http://springsource.org'
Expand All @@ -43,10 +43,11 @@ def customizePom(pom, gradleProject) {
distribution 'repo'
}
}

scm {
url = 'https://github.com/SpringSource/spring-integration'
connection = 'scm:git:git://github.com/SpringSource/spring-integration'
developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration'
url = linkScmUrl
connection = 'scm:git:' + linkScmConnection
developerConnection = 'scm:git:' + linkScmDevConnection
}

developers {
Expand Down

0 comments on commit 955e3ee

Please sign in to comment.