Skip to content

Commit

Permalink
Move publications 'mavenJava' to enabled artifactoryPublish task
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Feb 9, 2024
1 parent a5e6e21 commit 0f35645
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions utils/spring-artifactory-init.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,49 @@ allprojects {

apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin

afterEvaluate {
pluginManager.withPlugin('maven-publish') {
artifactory {
publish {
contextUrl = System.getenv('ARTIFACTORY_URL')
repository {
repoKey = System.getenv('ARTIFACTORY_REPOSITORY')
username = System.getenv('ARTIFACTORY_USERNAME')
password = System.getenv('ARTIFACTORY_PASSWORD')
}
defaults {
publications 'mavenJava'
def zipArtifactProps =
['zip.name' : project.name,
'zip.displayname': project.description,
'zip.deployed' : 'false']
properties {
mavenJava zipArtifactProps, '*:*:*:*@zip'
mavenJava 'zip.type': 'docs', '*:*:*:docs@zip'
mavenJava 'zip.type': 'dist', '*:*:*:dist@zip'
}
}
publishForkCount = 10
artifactory {
publish {
contextUrl = System.getenv('ARTIFACTORY_URL')
repository {
repoKey = System.getenv('ARTIFACTORY_REPOSITORY')
username = System.getenv('ARTIFACTORY_USERNAME')
password = System.getenv('ARTIFACTORY_PASSWORD')
}
defaults {
def zipArtifactProps =
['zip.name' : project.name,
'zip.displayname': project.description,
'zip.deployed' : 'false']
properties {
mavenJava zipArtifactProps, '*:*:*:*@zip'
mavenJava 'zip.type': 'docs', '*:*:*:docs@zip'
mavenJava 'zip.type': 'dist', '*:*:*:dist@zip'
}
}
publishForkCount = 10
}

buildInfo {
setProject(System.getenv('ARTIFACTORY_BUILD_PROJECT'))
setBuildName(System.getenv('ARTIFACTORY_BUILD_NAME'))
setBuildNumber(System.getenv('ARTIFACTORY_BUILD_NUMBER'))
setBuildUrl(System.getenv('ARTIFACTORY_BUILD_URL'))
setAgentName(System.getenv('ARTIFACTORY_USER_AGENT_NAME'))
setAgentVersion(System.getenv('ARTIFACTORY_USER_AGENT_VERSION'))
setVcsRevision(System.getenv('ARTIFACTORY_VCS_REVISION'))
setVcsUrl(System.getenv('ARTIFACTORY_VCS_URL'))
setArtifactoryPluginVersion('4.33.12')
}
buildInfo {
setProject(System.getenv('ARTIFACTORY_BUILD_PROJECT'))
setBuildName(System.getenv('ARTIFACTORY_BUILD_NAME'))
setBuildNumber(System.getenv('ARTIFACTORY_BUILD_NUMBER'))
setBuildUrl(System.getenv('ARTIFACTORY_BUILD_URL'))
setAgentName(System.getenv('ARTIFACTORY_USER_AGENT_NAME'))
setAgentVersion(System.getenv('ARTIFACTORY_USER_AGENT_VERSION'))
setVcsRevision(System.getenv('ARTIFACTORY_VCS_REVISION'))
setVcsUrl(System.getenv('ARTIFACTORY_VCS_URL'))
setArtifactoryPluginVersion('4.33.12')
}

clientConfig.connectionRetries = 4
clientConfig.insecureTls = false
}
clientConfig.connectionRetries = 4
clientConfig.insecureTls = false
}

afterEvaluate {
pluginManager.withPlugin('maven-publish') {
tasks.named('artifactoryPublish') {
enabled(true)
publications 'mavenJava'
}

if (!ossrhUrl && gpgPassphrase && gpgPrivateKey) {
Expand Down

0 comments on commit 0f35645

Please sign in to comment.