uranusjr commented on code in PR #68073:
URL: https://github.com/apache/airflow/pull/68073#discussion_r3366599752
##########
java-sdk/sdk/build.gradle.kts:
##########
@@ -303,29 +303,33 @@ publishing {
repositories {
maven {
name = "mavenRepo"
- url =
- uri(
- getProperty("mavenUrl")
- ?: if (sdkVersion.endsWith("-SNAPSHOT")) {
-
"https://repository.apache.org/content/repositories/snapshots/"
- } else {
-
"https://repository.apache.org/service/local/staging/deploy/maven2/"
- },
- )
- getProperty("mavenUsername", "ASF_NEXUS_USERNAME").let { user ->
- credentials {
- username = user
- password = getProperty("mavenPassword",
"ASF_NEXUS_PASSWORD")
+ val repoPath =
+ getProperty("mavenUrl")
+ ?: if (sdkVersion.endsWith("-SNAPSHOT")) {
+
"https://repository.apache.org/content/repositories/snapshots/"
+ } else {
+
"https://repository.apache.org/service/local/staging/deploy/maven2/"
+ }
+ url = uri(repoPath)
+ if (!repoPath.startsWith("file:")) {
+ val user = getProperty("mavenUsername", "ASF_NEXUS_USERNAME")
+ val pass = getProperty("mavenPassword", "ASF_NEXUS_PASSWORD")
+ if (user != null && pass != null) {
+ credentials {
+ username = user
+ password = pass
+ }
}
}
}
}
}
signing {
- getProperty("signing.key", "SIGNING_KEY").let { secretKey ->
- val password = getProperty("signing.password", "SIGNING_PASSWORD")
- useInMemoryPgpKeys(secretKey, password)
+ val signingKey = getProperty("signing.key", "SIGNING_KEY")?.takeIf {
it.isNotBlank() }
Review Comment:
Hmm, I assumed Nexus would reject an unsigned artifact. So signing is not
actually required? I’ll fix this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]