gnodet opened a new pull request, #422: URL: https://github.com/apache/maven-archiver/pull/422
## Summary This PR removes the `plexus-archiver` dependency from maven-archiver and migrates manifest generation to use standard JDK APIs and the Maven 4 API `Interpolator` service. ## Changes - **Remove `plexus-archiver`**: `createArchive()`, `getArchiver()`, `setArchiver()`, `setOutputFile()` and `configureReproducibleBuild()` removed from `MavenArchiver`. Plugins that need physical JAR creation should use the JDK `jar` tool directly (see companion PRs for maven-jar-plugin and maven-source-plugin). - **Remove `plexus-interpolation`**: classpath layout interpolation migrated to `session.getService(Interpolator.class)` from `maven-api-core`. - **`java.util.jar.Manifest`**: all `getManifest()` overloads now return `java.util.jar.Manifest` instead of `org.codehaus.plexus.archiver.jar.Manifest`. - **Delete `PomPropertiesUtil`**: no longer needed (was only used from `createArchive()`). - **Keep**: `parseBuildOutputTimestamp()`, `clampToDateMin()`, `setCreatedBy()`, `setBuildJdkSpecDefaultEntry()`, all manifest configuration classes (`MavenArchiveConfiguration`, `ManifestConfiguration`, `ManifestSection`, `BuildHelper`). ## Motivation Hervé raised concerns about maven-jar-plugin ([#618](https://github.com/apache/maven-jar-plugin/pull/618)) inlining manifest generation instead of putting shared code in maven-archiver. This PR addresses that concern by making maven-archiver the canonical place for manifest generation, free of plexus-archiver. Plugins migrating to the JDK `jar` tool can then depend on this library for manifest generation only. ## Companion PRs - maven-source-plugin: gnodet/maven-source-plugin#feat/use-jar-tool (replaces plexus-archiver with JDK jar tool, uses this library for manifest) - maven-jar-plugin: gnodet/maven-jar-plugin#feat/use-maven-archiver (delegates manifest generation to this library) ## Breaking changes Plugins that call `MavenArchiver.createArchive()` will need to be updated. Plugins that only call `MavenArchiver.getManifest()` are compatible (return type changes from plexus `Manifest` to `java.util.jar.Manifest`). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
