Skip to content

Commit

Permalink
Fix publishing config
Browse files Browse the repository at this point in the history
  • Loading branch information
lasanthaS committed Jan 15, 2024
1 parent 47fe438 commit 17e0d46
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,7 @@ configure(rootProject) {
tasks.named('build').configure {
finalizedBy('publishToMavenLocal')
}

tasks.named('publish').configure {
dependsOn('build')
}
17 changes: 17 additions & 0 deletions gradle/spring-module.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ publishing {
artifact javadocJar
}
}

repositories {
maven {
name 'nexus'
url = System.getenv("NEXUS_REPO_URL") ? System.getenv("NEXUS_REPO_URL") :
"https://maven.wso2.org/nexus/service/local/staging/deploy/maven2/"
credentials {
username rootProject.hasProperty("nexus_username") ? nexus_username : System.getenv("NEXUS_USERNAME")
password rootProject.hasProperty("nexus_password") ? nexus_password : System.getenv("NEXUS_PASSWORD")
}
allowInsecureProtocol = false
}
}
}

// Disable publication of test fixture artifacts.
Expand All @@ -104,3 +117,7 @@ components.java.withVariantsFromConfiguration(configurations.testFixturesRuntime
tasks.named('build').configure {
finalizedBy('publishToMavenLocal')
}

tasks.named('publish').configure {
dependsOn('build')
}

0 comments on commit 17e0d46

Please sign in to comment.