-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add module-info support and run CI with Java 11 #1948
Conversation
Release/snapshot process happens on jdk8... only a couple of modules are released using jdk11 |
If release/snapshot happens on jdk8 then moditect cannot be used and thus no module infos.
|
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.
New toolchain build in place.... build passes just have a few improvements ideas.
annotation-error-decoder/pom.xml
Outdated
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.moditect</groupId> |
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.
Move to the top pom, and skip plugin on the one project that can't be excuted
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.
OK. This adding the moditect plugin to the parent, enabled by default, skip on no modular projects, right?
pom.xml
Outdated
@@ -66,6 +66,7 @@ | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding> | |||
|
|||
<moditect.skip>true</moditect.skip> |
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.
Can we make default false and only declare skip = true on modules that need it?
So most submodules will be unchanged
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.
Be aware that the root must skip otherwise it will trigger an error, that's why the default is set to true
.
<plugin> | ||
<groupId>org.moditect</groupId> | ||
<artifactId>moditect-maven-plugin</artifactId> | ||
<version>${moditect-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>add-module-infos</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>add-module-info</goal> | ||
</goals> | ||
<configuration> | ||
<skip>${moditect.skip}</skip> | ||
<overwriteExistingFiles>true</overwriteExistingFiles> | ||
<module> | ||
<moduleInfo> | ||
<!-- module name will be derived from filename --> | ||
<!-- export everything --> | ||
<exports>*;</exports> | ||
<!-- declare services consumed by the artifact --> | ||
<addServiceUses>true</addServiceUses> | ||
</moduleInfo> | ||
</module> | ||
<jdepsExtraArgs> | ||
<arg>--multi-release=9</arg> | ||
</jdepsExtraArgs> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> |
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.
can we move this whole section to line 533 (outside pluginManagement
), I see no reason to keep it in here
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.
Yes, it can be safely moved.
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.
Yeah. I moved, push and merged... didn't realized the push got a conflict and didn't moved 🤦♂️
* Adds explicit module descriptors to a subset of modules (#1943) Fixes #1357 * Configure CI to run with Java 11 * Configure moditect for all modules, enable only on those that required it * Do not skip moditect when running tests * Only skip modules that don't work with moditect plugin --------- Co-authored-by: Marvin Froeder <velo@users.noreply.github.com> Co-authored-by: Marvin Froeder <velobr@gmail.com>
* Adds explicit module descriptors to a subset of modules (#1943) Fixes #1357 * Configure CI to run with Java 11 * Configure moditect for all modules, enable only on those that required it * Do not skip moditect when running tests * Only skip modules that don't work with moditect plugin --------- Co-authored-by: Marvin Froeder <velo@users.noreply.github.com> Co-authored-by: Marvin Froeder <velobr@gmail.com>
Related to #1943
I can confirm that
./mvnw verify -Dmoditect.skip=true
works with Java 8. This additional flag is set when running tests.The CNFE seen at #1943 no longer occurs when running the build with Java 8.