Skip to content

Commit f70aec6

Browse files
committed
Use nexus-staging plugin to automate sync to Maven central
1 parent 02e993e commit f70aec6

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ After pushing these changes to the repository you must wait for [the build](http
6060

6161
The [Travis CI](https://travis-ci.org/grails/grails-core) build will automatically upload the tagged release to Github and be available of the [Releases page](https://github.com/grails/grails-core/releases).
6262

63-
Note: Although by default Grails uses Artefactory to resolve dependencies, it is useful to have them in Maven Central too. To ensure they go to Maven Central login to [Sonatype OSS Nexus](https://oss.sonatype.org) with your account details then "Close" and "Release" the staged JAR files.
64-
65-
6663
License
6764
---
6865

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ buildscript {
1212
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0"
1313
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
1414
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
15+
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
1516
classpath 'net.gvmtool:gradle-sdkvendor-plugin:0.3.1'
1617
}
1718
}
@@ -203,6 +204,7 @@ subprojects { project ->
203204
apply plugin: 'com.bmuschko.nexus'
204205
apply plugin: 'maven-publish'
205206
apply plugin: 'com.jfrog.bintray'
207+
apply plugin: 'io.codearte.nexus-staging'
206208
}
207209
apply plugin: 'eclipse'
208210
apply plugin: 'idea'

travis-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if [[ $TRAVIS_PULL_REQUEST == 'false' && $EXIT_STATUS -eq 0
5454
echo "Running Gradle publish for branch $TRAVIS_BRANCH"
5555

5656
if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then
57-
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/secring.gpg" publish uploadArchives || EXIT_STATUS=$?
57+
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/secring.gpg" publish uploadArchives closeAndPromoteRepository || EXIT_STATUS=$?
5858
./gradlew assemble || EXIT_STATUS=$?
5959

6060
# Configure GIT

0 commit comments

Comments
 (0)