Skip to content

Update Maven plugins - #21

Merged
sylvestre merged 15 commits into
opencollab:masterfrom
danilovesky:update-maven-plugins
Nov 4, 2026
Merged

sylvestre merged 15 commits into
opencollab:masterfrom
danilovesky:update-maven-plugins

Conversation

@danilovesky

@danilovesky danilovesky commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
  • Compile with --release 8 (compiler plugin 3.14.1): removes 9 deprecation-for-removal warnings and checks code against the Java 8 API
  • Update jar, resources, source and shade plugins; exclude MANIFEST.MF from shading
  • Declare skinlf only in the modules that use it (core and view), not in the root pom
  • Enforce minimum JDK 21 (checkstyle engine) and Maven 3.6.3 (compiler plugin) with the enforcer plugin, and document them in README-BUILD.md
  • Run CI on JDK 21, 25 and 27
  • Remove deprecated oss-parent, which pinned maven-enforcer-plugin 1.2, and update enforcer to 3.7.0 (it was the only provider of the retired OSSRH deploy config and old release profile)
  • Pin maven-surefire-plugin and maven-clean-plugin so builds do not depend on the Maven version
  • Update maven-compiler-plugin (3.16.0)
  • Update maven-install-plugin and maven-deploy-plugin (3.2.0)
  • Update maven-checkstyle-plugin (14.4.0)
  • Update maven-bundle-plugin plugin to 6.2.0
  • Update JUnit to 6.1.3 (tests pass unchanged)
  • Remove unused site, scm, release and wagon plugin pins and the <reporting> section
  • Remove stale flexdock-dockbar entry from .gitignore

@mergify

mergify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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.

Comment thread pom.xml
<configuration>
<source>${javaVersion}</source>
<target>${javaVersion}</target>
<release>${javaVersion}</release>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to implement it in a more robust way using maven-enforcer-plugin.

Comment thread pom.xml
<plugin>
<!-- require JDK and Maven versions needed by the build -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no version here, maven will warn about it
could you please pin it in pluginManagement like the others? thanks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
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.
@danilovesky

danilovesky commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

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 oss-parent 9. I will reopen it shortly.

@danilovesky danilovesky closed this Nov 3, 2026
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.
@danilovesky danilovesky reopened this Nov 3, 2026
@danilovesky

danilovesky commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

@sylvestre all plugins are updated and few unused ones (as far as I can tell) are removed.
I updated the opening PR message with new bullet-points (starting with "Enforce minimum JDK 21...").

Could you also advise on how the package is deployed to Maven Central? Is it manual effort or is maven-deploy-plugin supposed to be used somehow?

@sylvestre
sylvestre merged commit 9337740 into opencollab:master Nov 4, 2026
12 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

@danilovesky
danilovesky deleted the update-maven-plugins branch November 4, 2026 09:06
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.

2 participants