Skip to content

[DRAFT] Turn Plexus Archiver into Multi Release Jar - #480

Draft
rfscholte wants to merge 31 commits into
masterfrom
mrjar
Draft

rfscholte wants to merge 31 commits into
masterfrom
mrjar

Conversation

@rfscholte

Copy link
Copy Markdown
Member

By turning this library into a Multi Release jar so it can still be consumed by projects that run on Java 8.
This will simplify maintainance in case there's a CVE in this codebase or one of its dependencies for projects that are blocked to move forward to Java 17.

@slachiewicz slachiewicz added the need-rebase Branch has conflicts and needs a rebase before it can merge label Aug 24, 2026
@rfscholte
rfscholte force-pushed the mrjar branch 3 times, most recently from 8a50bd8 to 43a1c14 Compare August 29, 2026 11:42
@rfscholte rfscholte removed the need-rebase Branch has conflicts and needs a rebase before it can merge label Sep 18, 2026
@slachiewicz slachiewicz added the enhancement New feature or request label Sep 24, 2026
@slachiewicz

Copy link
Copy Markdown
Member

Checked what a release from master with this PR would contain:

  • Java 8 works: base classes are Java 8 bytecode, the Java 17 variants sit under META-INF/versions/17, and all 79 Sisu components are base classes, so plugin injection is unchanged. Java 8 users get only the legacy API; the ServiceLoader API is 17+.
  • jar --validate (JDK 21) rejects the jar: 112 public classes exist only in the versioned layer, and FileSet, ArchivedFileSet, ArchiverManager, ArchiverFactory and UnArchiverFactory have a different API there. The differences are additive, so it works at runtime, but we should decide whether we accept a jar that isn't a spec-valid multi-release jar.
  • All 78 META-INF/services entries name 17-only classes.
  • The 359 unit tests run against the base classes only; the 17 variant gets the 162 failsafe tests. Nothing runs the JDK 17-built jar on Java 8.
  • A JDK 8 build silently produces a jar without the 17 layer; only the plexus-release profile enforces 17.
  • README.md still says 5.x requires Java 17.
  • The PR also reshapes the new API (spi renamed to provider, a new archivers/config, FileSetSpec, ArchivedFileSetSpec and UnixPermissions removed), which the title doesn't mention.

Open question: if 5.0.0 runs on Java 8, do we still need the 4.x line?

@rfscholte rfscholte changed the title Turn Plexus Archiver into Multi Release Jar [DRAFT] Turn Plexus Archiver into Multi Release Jar Nov 14, 2026
@rfscholte

Copy link
Copy Markdown
Member Author

if 5.0.0 runs on Java 8, do we still need the 4.x line?
There's no need to maintain the 4.x line

I've moved the PR to my own fork, so I can work on a solid API.
Once finalized I'll update all documentation, etc.

@slachiewicz
slachiewicz marked this pull request as draft November 19, 2026 12:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants