Index: Jenkinsfile =================================================================== diff -u -r8ba2cdc25509e8c9c3eaae55e95ee32093fb9d95 -rba32f44240631badeab872d005ac42fad6f1f778 --- Jenkinsfile (.../Jenkinsfile) (revision 8ba2cdc25509e8c9c3eaae55e95ee32093fb9d95) +++ Jenkinsfile (.../Jenkinsfile) (revision ba32f44240631badeab872d005ac42fad6f1f778) @@ -11,14 +11,15 @@ stage ('Build') { steps { checkout scm + cleanWs() sh "gradle -Dgrails.env=production --no-daemon clean" //sh "gradle -Dgrails.env=test --no-daemon check" sh "gradle -Dgrails.env=production --no-daemon assemble --refresh-dependencies" } post { success { // The artifact is named $project.projectDir which could be any number of things on Jenkins - archiveArtifacts(artifacts: "dist/*.jar", fingerprint: true) + archiveArtifacts(artifacts: "build/libs/*.jar", fingerprint: true) } } } Index: build.gradle =================================================================== diff -u -r9a7f18c8b8ed20ebd27edddab744973d693026c4 -rba32f44240631badeab872d005ac42fad6f1f778 --- build.gradle (.../build.gradle) (revision 9a7f18c8b8ed20ebd27edddab744973d693026c4) +++ build.gradle (.../build.gradle) (revision ba32f44240631badeab872d005ac42fad6f1f778) @@ -8,13 +8,52 @@ } } +plugins { + id 'application' +} + repositories { mavenLocal() maven { url 'https://workhorse.lemanscorp.com/nexus/repository/public/' } } + apply plugin: 'base' +apply plugin: 'maven-publish' +task sourceJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +publishing { + repositories { + maven { + credentials { + username 'admin' + password 'admin123' + } + if (project.version.endsWith('-SNAPSHOT')) { + url 'https://workhorse.lemanscorp.com/nexus/repository/snapshots' + } else { + url 'https://workhorse.lemanscorp.com/nexus/repository/releases' + } + } + } + + publications { + mavenJava(MavenPublication) { + from components.java + artifact sourceJar + } + } +} + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + + + //lemans configurations { compile.exclude module: 'common-logging' Index: settings.gradle =================================================================== diff -u -r197dce26fb97b9f9a2dd67d2b5c1c7dc788fdb43 -rba32f44240631badeab872d005ac42fad6f1f778 --- settings.gradle (.../settings.gradle) (revision 197dce26fb97b9f9a2dd67d2b5c1c7dc788fdb43) +++ settings.gradle (.../settings.gradle) (revision ba32f44240631badeab872d005ac42fad6f1f778) @@ -1,5 +1,10 @@ /* * This file was generated by the Gradle 'init' task. */ +pluginManagement { + repositories { + maven { url 'http://workhorse.lemanscorp.com/nexus/repository/public/' } + } +} rootProject.name = 'lemans-user-common'