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

Exclude Maven build breaking groovy-all dependency #951

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lpradel
Copy link

@lpradel lpradel commented Nov 12, 2024

By excluding the transitive dependency on org.codehaus.groovy:groovy-all:jar:3.0.13 we can prevent Maven builds from breaking simply by depending on this plugin. The same has already been done to the dependency on build-info-extractor-gradle right below in the pom.xml which leads me to suspect that it has been forgotten with the addition of the build-info-extractor-maven3 dependency. 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.13

In fact this problem can also be observed by simply trying to import the plugin sources to an IDE of your choice:
groovy-all-error

I believe the cause of this is that build-info-extractor-maven3 is 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


Copy link

github-actions bot commented Nov 12, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@lpradel
Copy link
Author

lpradel commented Nov 12, 2024

I have read the CLA Document and I hereby sign the CLA

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

Successfully merging this pull request may close these issues.

1 participant