Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 20 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import org.gradle.internal.jvm.Jvm

plugins {
// This adds tasks to auto close or release nexus staging repos
// see https://github.com/Codearte/gradle-nexus-staging-plugin/
id 'io.codearte.nexus-staging'
// see https://github.com/gradle-nexus/publish-plugin
id 'io.github.gradle-nexus.publish-plugin'
//OWASP Security Vulnerability Detection
id 'org.owasp.dependencycheck'
// Declare spotbugs at the top
Expand All @@ -32,39 +32,28 @@ wrapper {
distributionType = Wrapper.DistributionType.ALL
}

if (deployUrl.contains('nexus')) {
//internal terracotta config, shorten url for this plugin to end at local/
project.nexusStaging {
serverUrl = deployUrl.replaceAll(~/local\/.*$/, "local/")
packageGroup = 'Ehcache OS' //internal staging repository name
}
ext {
deployUser = tcDeployUser
deployPwd = tcDeployPassword
}
} else {
project.nexusStaging {
packageGroup = 'org.ehcache' //Sonatype staging repository name
}
ext {
deployUser = sonatypeUser
deployPwd = sonatypePwd
nexusPublishing {
repositories {
sonatype {
username = sonatypeUser
password = sonatypePwd
packageGroup = 'org.ehcache' //Sonatype staging repository name
}
nexus {
username = tcDeployUser
password = tcDeployPassword
packageGroup = 'Ehcache OS' //internal staging repository name
nexusUrl.set(uri('https://nexus.terracotta.eur.ad.sag:8443/service/local/'))
snapshotRepositoryUrl.set(uri("https://nexus.terracotta.eur.ad.sag:8443/content/repositories/terracotta-os-snapshots/"))
}
}
}

project.nexusStaging {
username = project.ext.deployUser
password = project.ext.deployPwd
logger.debug("Nexus Staging: Using login ${username} and url ${serverUrl}")
// Sonatype is often very slow in these operations:
delayBetweenRetriesInMillis = (findProperty('delayBetweenRetriesInMillis') ?: '10000') as int
numberOfRetries = (findProperty('numberOfRetries') ?: '100') as int
transitionCheckOptions {
delayBetween = Duration.ofSeconds((findProperty('delayBetweenRetriesInSeconds') ?: '10') as int)
maxRetries = (findProperty('numberOfRetries') ?: '100') as int
}
}

// Disable automatic promotion for added safety
closeAndReleaseRepository.enabled = false


ext {

baseVersion = findProperty('overrideVersion') ?: ehcacheVersion
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jacocoVersion = 0.8.5

sonatypeUser = OVERRIDE_ME
sonatypePwd = OVERRIDE_ME
tcDeployUser = OVERRIDE_ME
tcDeployPassword = OVERRIDE_ME

deployUrl = https://oss.sonatype.org/service/local/staging/deploy/maven2/

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

pluginManagement {
plugins {
id 'io.codearte.nexus-staging' version '0.21.1'
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
id 'com.github.spotbugs' version '4.2.3'
id 'org.jayware.osgi-ds' version '0.5.6'
id 'org.owasp.dependencycheck' version '5.2.4'
Expand Down