Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publication of jars workflow #764

Merged
merged 1 commit into from
Mar 1, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
./gradlew publishPluginZipPublicationToSnapshotsRepository
./gradlew publishPluginZipPublicationToSnapshotsRepository publishJarsPublicationToSnapshotsRepository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this new gradle task "publishJarsPublicationToSnapshotsRepository" introduced by a newer version of gradle? I don't see this task in my local env.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, you have to rebuild the project to refresh the caches

36 changes: 36 additions & 0 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ publishing {
name = 'staging'
url = "${rootProject.buildDir}/local-staging-repo"
}
maven {
name = "Snapshots"
url = "https://aws.oss.sonatype.org/content/repositories/snapshots"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
}
}
}
publications {
shadow(MavenPublication) { publication ->
Expand Down Expand Up @@ -99,6 +107,34 @@ publishing {
}
}
}
jars(MavenPublication) { publication ->
from components.java

pom {
name = "OpenSearch Machine Learning Client"
packaging = "jar"
url = "https://github.com/opensearch-project/ml-commons"
description = "OpenSearch Machine Learning Client"
scm {
connection = "scm:[email protected]:opensearch-project/ml-commons.git"
developerConnection = "scm:[email protected]:opensearch-project/ml-commons.git"
url = "[email protected]:opensearch-project/ml-commons.git"
}
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
name = "OpenSearch"
url = "https://github.com/opensearch-project/ml-commons"
}
}
}
}

}

}
Expand Down