Skip to content

Commit

Permalink
GEODE-781: Match repository id to allow Jenkins to upload Maven artif…
Browse files Browse the repository at this point in the history
…acts
  • Loading branch information
metatype committed Jan 16, 2016
1 parent e9bf253 commit fa60ac7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ subprojects {

// publishing configuration
apply plugin: 'com.bmuschko.nexus'
apply plugin: 'maven-publish-auth'

extraArchive {
sources = true
Expand Down Expand Up @@ -518,6 +517,17 @@ subprojects {
}
}

// Jenkins stores auth information in settings.xml. We apply the maven-publish-auth plugin to read that
// from gradle. However, we must match the repository id which the nexus plugin is not exposing.
apply plugin: 'maven-publish-auth'
afterEvaluate {
tasks.getByName('uploadArchives').repositories.mavenDeployer() {
if (project.nexus.snapshotRepositoryUrl) {
repository(id: 'apache.snapshots.https', url: project.nexus.snapshotRepositoryUrl)
}
}
}

// Make precheckin task run all validation tests for checking in code.
task precheckin (dependsOn: [ build, integrationTest, distributedTest ]) {
description 'Run this task before checking in code to validate changes. This task combines the following tasks: build, integrationTest, and distributedTest'
Expand All @@ -535,4 +545,3 @@ subprojects {
// Make sure clean task for rootProject runs last
clean.finalizedBy rootProject.clean
}

0 comments on commit fa60ac7

Please sign in to comment.