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

Fix publishing to sonatype #804

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

ryanbogan
Copy link
Member

Description

Fixes publishing to sonatype that was broken by #687

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Ryan Bogan <[email protected]>
@joshpalis joshpalis merged commit fdafe8b into opensearch-project:main Jun 5, 2023
@opensearch-trigger-bot
Copy link

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-1.x 1.x
# Navigate to the new working tree
pushd ../.worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-804-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fdafe8b27ee8ad60359290939fdfd99a0ac859f8
# Push it to GitHub
git push --set-upstream origin backport/backport-804-to-1.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-804-to-1.x.

@joshpalis
Copy link
Member

@ryanbogan Publishing to sonatype has been successful. Publishing to maven local has some failures now :

> Task :generatePomFileForNebulaPublication FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':generatePomFileForNebulaPublication' (type 'GenerateMavenPom').
  - Gradle detected a problem with the following location: '/local/home/jpalis/repos/state/opensearch-sdk-java/build/distributions/opensearch-sdk-java-2.0.0-SNAPSHOT.pom'.
    
    Reason: Task ':publishMavenJavaPublicationToMavenLocal' uses this output of task ':generatePomFileForNebulaPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':generatePomFileForNebulaPublication' as an input of ':publishMavenJavaPublicationToMavenLocal'.
      2. Declare an explicit dependency on ':generatePomFileForNebulaPublication' from ':publishMavenJavaPublicationToMavenLocal' using Task#dependsOn.
      3. Declare an explicit dependency on ':generatePomFileForNebulaPublication' from ':publishMavenJavaPublicationToMavenLocal' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.1.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants