fixing artifact creation

This commit is contained in:
Jörg Prante 2016-10-29 20:00:22 +02:00
parent b9ac7f87bd
commit 19682d6155
10 changed files with 68 additions and 71 deletions

View file

@ -1,15 +1,22 @@
plugins { plugins {
id "org.sonarqube" version "2.1-rc1" id "org.sonarqube" version "2.2"
id "org.ajoberstar.github-pages" version "1.6.0-rc.1" id "org.ajoberstar.github-pages" version "1.6.0-rc.1"
id "org.xbib.gradle.plugin.jbake" version "1.1.0" id "org.xbib.gradle.plugin.jbake" version "1.1.0"
} }
println "Host: " + java.net.InetAddress.getLocalHost()
println "Gradle: " + gradle.gradleVersion + " JVM: " + org.gradle.internal.jvm.Jvm.current() + " Groovy: " + GroovySystem.getVersion()
println "Build: group: '${project.group}', name: '${project.name}', version: '${project.version}'" ext {
versions = [
'jackson' : '2.8.3'
]
}
allprojects { allprojects {
group = 'org.xbib'
version = '1.0.1'
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'signing' apply plugin: 'signing'
@ -25,8 +32,6 @@ allprojects {
configurations { configurations {
wagon wagon
provided
testCompile.extendsFrom(provided)
} }
dependencies { dependencies {
@ -41,53 +46,13 @@ allprojects {
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-profile" << "compact2" options.compilerArgs << "-Xlint:all" << "-profile" << "compact2"
} }
test { test {
classpath += configurations.provided
testLogging { testLogging {
showStandardStreams = false showStandardStreams = false
exceptionFormat = 'full' exceptionFormat = 'full'
} }
} }
tasks.withType(FindBugs) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = false
}
}
tasks.withType(Pmd) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = true
}
}
tasks.withType(Checkstyle) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = true
}
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
xml.destination "${buildDir}/reports/jacoco-xml"
html.destination "${buildDir}/reports/jacoco-html"
}
}
sonarqube {
properties {
property "sonar.projectName", "xbib content"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.tests", "src/test/java"
property "sonar.scm.provider", "git"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.junit.reportsPath", "build/test-results/test/"
}
}
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources' classifier 'sources'
@ -107,5 +72,6 @@ allprojects {
apply from: "${rootProject.projectDir}/gradle/ext.gradle" apply from: "${rootProject.projectDir}/gradle/ext.gradle"
apply from: "${rootProject.projectDir}/gradle/publish.gradle" apply from: "${rootProject.projectDir}/gradle/publish.gradle"
apply from: "${rootProject.projectDir}/gradle/sonarqube.gradle"
} }

View file

@ -1,3 +1,3 @@
dependencies { dependencies {
compile "com.fasterxml.jackson.core:jackson-core:2.8.3" compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
} }

View file

@ -1,5 +1,5 @@
dependencies { dependencies {
compile "com.fasterxml.jackson.core:jackson-databind:2.8.3" compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
testCompile('junit:junit:4.12') { testCompile('junit:junit:4.12') {
exclude group: 'org.hamcrest' exclude group: 'org.hamcrest'
} }

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
compile project(':content-core') compile project(':content-core')
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.3" compile "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${versions.jackson}"
} }

View file

@ -1,5 +1,5 @@
dependencies { dependencies {
compile project(':content-core') compile project(':content-core')
compile project(':content-resource') compile project(':content-resource')
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.8.3" compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}"
} }

View file

@ -1,4 +1,4 @@
dependencies { dependencies {
compile project(':content-core') compile project(':content-core')
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.3" compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}"
} }

View file

@ -1,3 +0,0 @@
group = org.xbib
version = 1.0.1
org.gradle.daemon = true

View file

@ -1,8 +1,8 @@
ext { ext {
user = 'xbib' user = 'xbib'
projectName = 'marc' projectName = 'content'
projectDescription = 'MARC bibliographic data processing library for Java' projectDescription = 'Content processing library for Java'
scmUrl = 'https://github.com/xbib/marc' scmUrl = 'https://github.com/xbib/content'
scmConnection = 'scm:git:git://github.com/xbib/marc.git' scmConnection = 'scm:git:git://github.com/xbib/content.git'
scmDeveloperConnection = 'scm:git:git://github.com/xbib/marc.git' scmDeveloperConnection = 'scm:git:git://github.com/xbib/content.git'
} }

View file

@ -28,7 +28,10 @@ task sonatypeUpload(type: Upload) {
authentication(userName: ossrhUsername, password: ossrhPassword) authentication(userName: ossrhUsername, password: ossrhPassword)
} }
pom.project { pom.project {
name projectName groupId project.group
artifactId project.name
version project.version
name project.name
description projectDescription description projectDescription
packaging 'jar' packaging 'jar'
inceptionYear '2016' inceptionYear '2016'
@ -61,13 +64,3 @@ task sonatypeUpload(type: Upload) {
} }
} }
} }
githubPages {
repoUri = 'git@github.com:xbib/marc.git'
targetBranch = "gh-pages"
pages {
from(file('build/jbake')) {
into '.'
}
}
}

41
gradle/sonarqube.gradle Normal file
View file

@ -0,0 +1,41 @@
tasks.withType(FindBugs) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = false
}
}
tasks.withType(Pmd) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = true
}
}
tasks.withType(Checkstyle) {
ignoreFailures = true
reports {
xml.enabled = true
html.enabled = true
}
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
xml.destination "${buildDir}/reports/jacoco-xml"
html.destination "${buildDir}/reports/jacoco-html"
}
}
sonarqube {
properties {
property "sonar.projectName", "${project.group} ${project.name}"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.tests", "src/test/java"
property "sonar.scm.provider", "git"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.junit.reportsPath", "build/test-results/test/"
}
}