Exclude Maven build breaking groovy-all dependency#951
Open
lpradel wants to merge 1 commit into
Open
Conversation
….0.13 which causes Maven builds to break
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By excluding the transitive dependency on
org.codehaus.groovy:groovy-all:jar:3.0.13we can prevent Maven builds from breaking simply by depending on this plugin. The same has already been done to the dependency onbuild-info-extractor-gradleright below in thepom.xmlwhich leads me to suspect that it has been forgotten with the addition of thebuild-info-extractor-maven3dependency. Obviously, Groovy is supplied in the runtime classpath of Jenkins itself and is therefore redundant.To illustrate the current issue I have created a minimal sample Maven project here:
https://github.com/lpradel/jenkins-artifactory-plugin-groovy-all-dependency-fault-demo
This project only has a single dependency which is this plugin and the build will always fail with the following error message:
Could not resolve dependencies (...) : Could not find artifact org.codehaus.groovy:groovy-all:jar:3.0.13In fact this problem can also be observed by simply trying to import the plugin sources to an IDE of your choice:

I believe the cause of this is that
build-info-extractor-maven3is built through Gradle and therefore the following issue comes into play:[1] geb/issues#586
[2] https://stackoverflow.com/questions/61444749/could-not-find-artifact-org-codehaus-groovygroovy-alljar2-5-6-in-pom-in-java/61444990