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 {
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.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 {
group = 'org.xbib'
version = '1.0.1'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
@ -25,8 +32,6 @@ allprojects {
configurations {
wagon
provided
testCompile.extendsFrom(provided)
}
dependencies {
@ -41,53 +46,13 @@ allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-profile" << "compact2"
}
test {
classpath += configurations.provided
testLogging {
showStandardStreams = false
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) {
classifier 'sources'
@ -107,5 +72,6 @@ allprojects {
apply from: "${rootProject.projectDir}/gradle/ext.gradle"
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
apply from: "${rootProject.projectDir}/gradle/sonarqube.gradle"
}

View file

@ -1,3 +1,3 @@
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 {
compile "com.fasterxml.jackson.core:jackson-databind:2.8.3"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
testCompile('junit:junit:4.12') {
exclude group: 'org.hamcrest'
}

View file

@ -1,4 +1,4 @@
dependencies {
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 {
compile project(':content-core')
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 {
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 {
user = 'xbib'
projectName = 'marc'
projectDescription = 'MARC bibliographic data processing library for Java'
scmUrl = 'https://github.com/xbib/marc'
scmConnection = 'scm:git:git://github.com/xbib/marc.git'
scmDeveloperConnection = 'scm:git:git://github.com/xbib/marc.git'
projectName = 'content'
projectDescription = 'Content processing library for Java'
scmUrl = 'https://github.com/xbib/content'
scmConnection = 'scm:git:git://github.com/xbib/content.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)
}
pom.project {
name projectName
groupId project.group
artifactId project.name
version project.version
name project.name
description projectDescription
packaging 'jar'
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/"
}
}