Skip to content

Commit caafa47

Browse files
authored
Merge pull request #19 from redhat-developer/16
Add the new nexus plugin, customize artifact ID, remove SNAPSHOT from the version
2 parents f473fe3 + 3bef0b6 commit caafa47

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ node('rhel7') {
1919
if (isSnapshot) {
2020
sh "./gradlew publish -PnexusUser=${USER} -PnexusPassword=${PASSWORD}"
2121
} else {
22-
sh "./gradlew publish closeAndReleaseRepository -PnexusUser=${USER} -PnexusPassword=${PASSWORD}"
22+
sh "./gradlew publish closeAndReleaseStagingRepository -PnexusUser=${USER} -PnexusPassword=${PASSWORD}"
2323
}
2424
}
2525
}

build.gradle

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ plugins {
22
id 'java-library'
33
id 'maven-publish'
44
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
5-
id 'io.codearte.nexus-staging' version "0.22.0"
5+
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
66
}
77

8-
group 'com.redhat.devtools.intellij.commonUiTestLibrary'
8+
group 'com.redhat.devtools.intellij'
99
version projectVersion
1010

1111
apply plugin: 'maven'
12-
apply plugin: 'io.codearte.nexus-staging'
12+
apply plugin: 'io.github.gradle-nexus.publish-plugin'
1313

1414
def remoteRobotVersion = '0.11.2'
1515
def fixturesVersion = '1.1.18'
@@ -32,15 +32,13 @@ dependencies {
3232
api "com.intellij.remoterobot:remote-fixtures:$fixturesVersion"
3333
}
3434

35-
test {
36-
useJUnitPlatform()
35+
java {
36+
withSourcesJar()
37+
withJavadocJar()
3738
}
3839

39-
nexusStaging {
40-
serverUrl = 'https://repository.jboss.org/nexus/service/local/'
41-
username = nexusUser
42-
password = nexusPassword
43-
packageGroup = 'JBoss Releases Staging Profile'
40+
test {
41+
useJUnitPlatform()
4442
}
4543

4644
publishing {
@@ -75,7 +73,7 @@ publishing {
7573
}
7674
repositories {
7775
maven {
78-
def releasesRepoUrl = "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2"
76+
def releasesRepoUrl = "https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/"
7977
def snapshotsRepoUrl = "https://repository.jboss.org/nexus/content/repositories/snapshots/"
8078
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
8179
credentials {
@@ -84,4 +82,17 @@ publishing {
8482
}
8583
}
8684
}
87-
}
85+
}
86+
87+
nexusPublishing {
88+
packageGroup = 'JBoss Releases Staging Profile'
89+
repositories {
90+
jbossNexus {
91+
stagingProfileId = '2161b7b8da0080'
92+
username = nexusUser
93+
password = nexusPassword
94+
nexusUrl.set(uri('https://repository.jboss.org/nexus/service/local/'))
95+
snapshotRepositoryUrl.set(uri('https://repository.jboss.org/nexus/content/repositories/snapshots/'))
96+
}
97+
}
98+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
projectVersion=0.0.1-SNAPSHOT
1+
projectVersion=0.0.1
22
nexusUser=invalid
33
nexusPassword=invalid

0 commit comments

Comments
 (0)