Skip to content

Commit

Permalink
Fix publishing to sonatype (#804)
Browse files Browse the repository at this point in the history
* Fix publishing to sonatype

Signed-off-by: Ryan Bogan <[email protected]>

* Disable additional check coming from opensearch plugin

Signed-off-by: Ryan Bogan <[email protected]>

* Added resolution strategy

Signed-off-by: Ryan Bogan <[email protected]>

* Resolution strategies

Signed-off-by: Ryan Bogan <[email protected]>

---------

Signed-off-by: Ryan Bogan <[email protected]>
  • Loading branch information
ryanbogan authored Jun 5, 2023
1 parent 247c2cd commit fdafe8b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ allprojects {
group 'org.opensearch.sdk'
version '2.0.0-SNAPSHOT'

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

repositories {
maven {
name = "Snapshots" // optional target repository name
url = "https://aws.oss.sonatype.org/content/repositories/snapshots"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
}
}
}
}

validateMavenJavaPom.enabled = false

repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -155,6 +176,9 @@ dependencies {
resolutionStrategy.force("jakarta.json:jakarta.json-api:${jakartaVersion}")
resolutionStrategy.force("com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}")
resolutionStrategy.force("com.fasterxml.jackson.core:jackson-core:${jacksonDatabindVersion}")
resolutionStrategy.force("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonDatabindVersion}")
resolutionStrategy.force("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jacksonDatabindVersion}")
resolutionStrategy.force("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jacksonDatabindVersion}")
resolutionStrategy.force("org.apache.logging.log4j:log4j-api:${log4jVersion}")
resolutionStrategy.force("org.apache.logging.log4j:log4j-core:${log4jVersion}")
resolutionStrategy.force("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
Expand Down

0 comments on commit fdafe8b

Please sign in to comment.