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
Chore: Allow running tests with OpenJDK 11 and 15: bump Groovy and Junit dependencies #173
Chore: Allow running tests with OpenJDK 11 and 15: bump Groovy and Junit dependencies #173
Conversation
Signed-off-by: dduportal <damien.duportal@gmail.com>
Signed-off-by: dduportal <damien.duportal@gmail.com>
Signed-off-by: dduportal <damien.duportal@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.codehaus.groovy</groupId> | ||
<artifactId>groovy-all</artifactId> | ||
<version>${groovy.version}</version> | ||
<!-- Type pom replaces the über "groovy-all.jar", for version 3+ --> | ||
<type>pom</type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need this groovy dependency? or should we be specifying just the actual groovy jar? seems weird to depend on a pom artifact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea if it is required or not. On 1 side it might be right as this dependency is not mentionned in https://github.com/jenkinsci/JenkinsPipelineUnit#add-to-your-project-as-test-dependency .
On the other, my knowledge is not sufficient enough how to make this work without this 😱
It looks like that the groovy-all
(e.g. the Eclipse Groovy Compiler) is not the only solution: https://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html#section-groovyeclipse . But it is recommended when there is a joint Java-Groovy compilation, which should be the case for shared library if I understand correctly the src/**
usage is that right?
=> If this assumption is valid, then https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin is to be used, but there is no mention of groovy-all
in this doc. So I don't really know 🤷🏾♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should do the job. Would be nice to add it to the Pipeline though
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR allows executing the library's unit tests (
mvn clean test
) when you have a recent OpenJDK (11 or 15).It involves bumping the Groovy dependency (and associated compiler sub-dependencies) to 3.x (instead of 2.x), as well as Junit to 5.x.
Please note that the
pom.xml
is still specifying a compile target as1.8
as before of course.