Repository navigation
Conversation
gnodet
force-pushed
the
feat/use-jar-tool
branch
from
October 19, 2026 09:16
993a4fe to
e31f0eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates maven-source-plugin away from
plexus-archiverandmaven-archiver'screateArchive()to use the JDK built-injartool for archive creation, while keepingmaven-archiverfor manifest generation only.Changes
New classes
SourceFileCollector: walks source directories withFiles.walkFileTree(), applies include/exclude glob patterns, handles default SCM excludes (replaces plexusDefaultFileSet).SourceToolExecutor: invokesToolProvider.findFirst("jar")via a staging directory approach. Supports--datefor reproducible builds (JDK 19+). UsesMavenArchiver.parseBuildOutputTimestamp()for timestamp parsing.Modified
AbstractSourceJarMojo: removedJarArchiverinjection and all plexus archiver usage. New flow: collect files → build manifest withMavenArchiver.getManifest()→ create JAR withSourceToolExecutor. Generates maven descriptor (pom.xml + pom.properties) inline.pom.xml: removedplexus-archiverandplexus-utilsdependencies, bumpedmaven-archiverto4.0.0-beta-7-SNAPSHOT.Deleted
Archivers.java: providedJarArchivervia DI — no longer needed.Motivation
Depends on apache/maven-archiver#422 which strips
plexus-archiverfrom maven-archiver itself. The sources JAR is structurally simpler than the JAR plugin (no MR-JAR, no JPMS module hierarchy, no classpath) so the JDKjartool invocation is straightforward.