-
Notifications
You must be signed in to change notification settings - Fork 66
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 error InvalidMavenPublicationException
#554
Conversation
Signed-off-by: prudhvigodithi <[email protected]>
org.gradle.api.publish.maven.InvalidMavenPublicationException:
org.gradle.api.publish.maven.InvalidMavenPublicationException
org.gradle.api.publish.maven.InvalidMavenPublicationException
InvalidMavenPublicationException
Build pass on my local with this change maven folder with
|
Signed-off-by: prudhvigodithi <[email protected]> Signed-off-by: prudhvigodithi <[email protected]> (cherry picked from commit 35a091a)
Signed-off-by: prudhvigodithi <[email protected]> Signed-off-by: prudhvigodithi <[email protected]> (cherry picked from commit 35a091a) Co-authored-by: Prudhvi Godithi <[email protected]>
@prudhvigodithi This is interesting. Right now I am not sure why this is happening. But I noticed one interesting thing, without your modification from this PR I am still able to build both plugins individually like this: # Let's get to the root notifications folder which hosts subprojects (the plugins)
$ cd notifications
# Start with the core plugin
$ cd core
$ ../gradlew clean publishToMavenLocal
# Switch to notification plugin and build it
$ cd ../notifications
$ ../gradlew clean publishToMavenLocal And now I can see the following in my local mvn repo $ pwd
/Users/lukas.vlcek/.m2/repository/org/opensearch/plugin
$ ls -ltr
drwxr-xr-x 4 lukas.vlcek staff 128 Oct 14 20:57 opensearch-notifications-core
drwxr-xr-x 4 lukas.vlcek staff 128 Oct 14 20:59 notifications So both the plugins were build correctly (at least it seems to me). It feels to me that something is stepping on each other's toes when gradle is run from the parent folder (which I think is the case of the |
I was looking at this again and I think for the time being we could consider the following workaround: Instead of this, which fails with exception:
We can run the tasks for all subprojects individually. Not great but we could live with it until we find a better fix?:
BTW, I think there is a related issue in gradle gradle/gradle#6009 which was closed by gradle/gradle#9465 |
Hey @lukas-vlcek thanks, if so we should consider modifying the notifications-core and notifications build scripts and execute the build workflow Once this build successfully we can then remove the added setting |
The is also a nebule plugin upgrade PR going on opensearch-project/OpenSearch#4810 (it might be relevant, or not... I do not know atm). Let's keep a reference this PR here (even if it is for |
I had a short chat with @prudhvigodithi about this yesterday and the following is the summary: TL;DR: We are ok for now to move forward with this PR as it is. More details: For now we are ok with the workaround provided in this PR as it is unblocking the build process. The side-effect of this PR is that ZIP publication artifacts for OpenSearch plugins ( It would make sense to try to run the build for each individual plugin as suggested and demonstrated above because this does not lead to the exception and all plugins are built as expected. But that would require changes to the build scripts itself and that can be a risk that we do not want to take now given we are approaching This being said there are potentially two issues that we need to keep an eye on in the future:
|
Description
Fix error
org.gradle.api.publish.maven.InvalidMavenPublicationException:
Coming from the comment #549 (comment)
Issues Resolved
#501
Check List
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.