Skip to content

Commit

Permalink
Update maven publication to include cksums.
Browse files Browse the repository at this point in the history
This change adds a local staging repo task that will include cksums.  It will also update build.sh to use this new task and copy the contents of the staging repo to the output directory.
The maven publish plugin will not include these cksums when publishing to maven local but will when published to a separate folder.

Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 committed Nov 3, 2021
1 parent 32f0c6f commit 66215cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ tasks.withType(Jar) { task ->
}

publishing {
repositories {
maven {
name = 'staging'
url = "${rootProject.buildDir}/local-staging-repo"
}
}
publications {
shadow(MavenPublication) {
project.shadow.component(it)
Expand Down
3 changes: 2 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ fi

./gradlew build -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
./gradlew publishShadowPublicationToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
./gradlew publishShadowPublicationToStagingRepository -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
mkdir -p $OUTPUT/maven/org/opensearch
cp -r ./build/libs $OUTPUT/maven/org/opensearch/common-utils
cp -r ./build/local-staging-repo/org/opensearch/common-utils $OUTPUT/maven/org/opensearch/common-utils

0 comments on commit 66215cc

Please sign in to comment.