Repository navigation
Update Maven plugins - #21
Conversation
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
| <configuration> | ||
| <source>${javaVersion}</source> | ||
| <target>${javaVersion}</target> | ||
| <release>${javaVersion}</release> |
There was a problem hiding this comment.
--release needs JDK 9+ to build, and compiler 3.14.1 needs maven 3.6.3+
README-BUILD.md still says "maven 3.0 or later", could you please update it? thanks
There was a problem hiding this comment.
I will try to implement it in a more robust way using maven-enforcer-plugin.
| <plugin> | ||
| <!-- require JDK and Maven versions needed by the build --> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-enforcer-plugin</artifactId> |
There was a problem hiding this comment.
no version here, maven will warn about it
could you please pin it in pluginManagement like the others? thanks
There was a problem hiding this comment.
I added the version tag for maven-enforce-plugin.
Update maven-compiler-plugin to 3.14.1 and replace source/target with release, so the code is compiled against the Java 8 API instead of the JDK's. This removes the warnings about Applet and finalize() being deprecated for removal. Suppress the notice that Java 8 is obsolete on newer JDKs.
Update maven-jar-plugin to 3.5.1, maven-resources-plugin to 3.5.0, maven-source-plugin to 3.4.0 and maven-shade-plugin to 3.6.2. Exclude MANIFEST.MF from shading, as it is generated by the manifest transformer, to avoid overlapping resource warnings. Built jars have the same contents as before.
The root pom declared skinlf for all modules, but only core and view use it. Remove it from the root and declare it in view, which used it implicitly. Core already declares it. Built jars have the same contents as before.
Require JDK 21+ because the checkstyle engine needs it, and Maven 3.6.3+ as needed by the compiler plugin. Pin the enforcer plugin version, as used by the parent POM, in pluginManagement. Document the requirements in README-BUILD.md.
The checkstyle engine requires JDK 21 to run, so JDK 11 and 17 can no longer build the project.
f2b669d to
b6963ad
Compare
The Sonatype oss-parent 9 is the last release and is deprecated. It forced maven-enforcer-plugin 1.2 and added a Maven 2.1/2.2 check that is superseded by the existing Maven version rule. Nothing in the build uses its distribution management or release profile. Remove the parent and update the enforcer plugin to 3.7.0.
|
Let me (temporary) close this PR and do a bit more work on removing deprecated plugins and sorting out maven-enforcer-plugin version (it is forced to very old version by |
These plugins got their versions from the Maven super-POM defaults, which depend on the Maven version in use. Pin them in pluginManagement for reproducible builds.
Disable import of java.* packages and the execution environment requirement, which the newer bnd adds by default, to keep the generated manifests as before. The remaining differences are that the demo no longer imports org.flexdock.docking.adapter, as it only uses a compile-time constant from it, and that Implementation-Vendor-Id is no longer present in the jar manifests.
The site, scm, release, wagon and svn provider plugins are not bound to the build. They were left from the Subversion and java.net setup and the project is now built and released without them.
It configured 2010-era reporting plugins (project info reports, jxr, javadoc, findbugs) that are only used by mvn site, which the project does not seem to use.
JUnit 6 requires Java 17 or newer at test runtime, which is satisfied as the build already requires JDK 21.
The flexdock-dockbar module no longer exists.
|
@sylvestre all plugins are updated and few unused ones (as far as I can tell) are removed. Could you also advise on how the package is deployed to Maven Central? Is it manual effort or is |
|
Thanks for your PR |
--release 8(compiler plugin 3.14.1): removes 9 deprecation-for-removal warnings and checks code against the Java 8 APIMANIFEST.MFfrom shadingskinlfonly in the modules that use it (core and view), not in the root pomREADME-BUILD.mdoss-parent, which pinnedmaven-enforcer-plugin1.2, and update enforcer to 3.7.0 (it was the only provider of the retired OSSRH deploy config and old release profile)maven-surefire-pluginandmaven-clean-pluginso builds do not depend on the Maven versionmaven-compiler-plugin(3.16.0)maven-install-pluginandmaven-deploy-plugin(3.2.0)maven-checkstyle-plugin(14.4.0)maven-bundle-pluginplugin to 6.2.0<reporting>sectionflexdock-dockbarentry from.gitignore