diff --git a/Jenkinsfile b/Jenkinsfile index d3de3c9..a857fdb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,9 +30,9 @@ node('rhel7'){ if (isSnapshot) { sh "./gradlew publish -PnexusUser=${USER} -PnexusPassword=${PASSWORD}" } else { - sh "./gradlew publish closeAndReleaseRepository -PnexusUser=${USER} -PnexusPassword=${PASSWORD}" currentBuild.keepLog = true currentBuild.description = "${version}" + sh "./gradlew publish closeAndReleaseStagingRepository -PnexusUser=${USER} -PnexusPassword=${PASSWORD}" } } } diff --git a/build.gradle b/build.gradle index 55c75ac..1dabaa3 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.intellij" version "1.1.4" id 'maven-publish' - id 'io.codearte.nexus-staging' version "0.22.0" + id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' } repositories { @@ -14,7 +14,6 @@ apply plugin: 'idea' apply plugin: 'org.jetbrains.intellij' apply plugin: 'java' apply plugin: 'jacoco' -apply plugin: 'io.codearte.nexus-staging' intellij { version = ideaVersion //for a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases @@ -51,11 +50,16 @@ group 'com.redhat.devtools.intellij' version projectVersion // Plugin version -nexusStaging { - serverUrl = 'https://repository.jboss.org/nexus/service/local/' - username = nexusUser - password = nexusPassword +nexusPublishing { packageGroup = 'JBoss Releases Staging Profile' + repositories { + jbossNexus { + nexusUrl = uri("https://repository.jboss.org/nexus/service/local/") + snapshotRepositoryUrl = uri("https://repository.jboss.org/nexus/content/repositories/snapshots/") + username = nexusUser // defaults to project.properties["myNexusUsername"] + password = nexusPassword // defaults to project.properties["myNexusPassword"] + } + } } def testJarFile = file("$buildDir/libs/intellij-common-${projectVersion}-test.jar") @@ -94,15 +98,4 @@ publishing { } } } - repositories { - maven { - def releasesRepoUrl = "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2" - def snapshotsRepoUrl = "https://repository.jboss.org/nexus/content/repositories/snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username = nexusUser - password = nexusPassword - } - } - } }