Re: Rewrite of JAR plugin ready for merge

Sergey Chernov <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.devel
Message-ID <CAJ-bKn=SgmrCNhEq_e-Q4+wwXD_0mwjqGjbcta-hTZh+HTk3Ww@mail.gmail.com>
Hey, Martin.
I've checked it with our build in combination with 4.0.0-rc-6, and the
build fails. The master build of maven-jar-plugin (4.0.0-beta-2-SNAPSHOT)
is fine.
Some details:

mvn40 -v

Apache Maven 4.0.0-SNAPSHOT (477fe878ba0b8a7522cda992dd6b09192fae6e8e)

Maven home: /Users/sergey/Java/apache-maven-4.0.x-SNAPSHOT

Java version: 25.0.3, vendor: Amazon.com Inc., runtime:
/Users/sergey/.sdkman/candidates/java/25.0.3-amzn

Default locale: en_US, platform encoding: UTF-8, time zone: Europe/Amsterdam

OS name: "mac os x", version: "26.6.1", arch: "aarch64", family: "mac"

The build failure:


[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-2-SNAPSHOT:jar
(default-jar) on project data-migration-impl-e2e-test: Error while
assembling the JAR file.:
/Users/username/dev/acme/server2/server/data-migration/data-migration-impl-e2e-test/target/classes-3197869813651266208
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.apache.maven.plugins:maven-jar-plugin:4.0.0-beta-2-SNAPSHOT:jar
(default-jar) on project data-migration-impl-e2e-test: Error while
assembling the JAR file.
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:346)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$1(MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    at java.lang.Thread.run(Thread.java:1474)
Caused by: org.apache.maven.api.plugin.MojoException: Error while
assembling the JAR file.
    at org.apache.maven.plugins.jar.AbstractJarMojo.execute(AbstractJarMojo.java:339)
    at org.apache.maven.plugin.DefaultBuildPluginManager$MojoWrapper.execute(DefaultBuildPluginManager.java:244)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:339)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$1(MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    at java.lang.Thread.run(Thread.java:1474)
Caused by: java.nio.file.NoSuchFileException:
/Users/username/dev/acme/server2/server/data-migration/data-migration-impl-e2e-test/target/classes-3197869813651266208
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
    at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:418)
    at java.nio.file.Files.createDirectory(Files.java:647)
    at java.nio.file.TempFileHelper.create(TempFileHelper.java:130)
    at java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:162)
    at java.nio.file.Files.createTempDirectory(Files.java:893)
    at org.apache.maven.plugins.jar.MetadataFiles.baseDirectory(MetadataFiles.java:138)
    at org.apache.maven.plugins.jar.MetadataFiles.addManifest(MetadataFiles.java:122)
    at org.apache.maven.plugins.jar.ToolExecutor.writeSingleJAR(ToolExecutor.java:355)
    at org.apache.maven.plugins.jar.FileCollector.writeAllJARs(FileCollector.java:471)
    at org.apache.maven.plugins.jar.ToolExecutor.writeAllJARs(ToolExecutor.java:293)
    at org.apache.maven.plugins.jar.AbstractJarMojo.createArchives(AbstractJarMojo.java:322)
    at org.apache.maven.plugins.jar.AbstractJarMojo.execute(AbstractJarMojo.java:335)
    at org.apache.maven.plugin.DefaultBuildPluginManager$MojoWrapper.execute(DefaultBuildPluginManager.java:244)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:339)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
    at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$1(MultiThreadedBuilder.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
    at java.util.concurrent.FutureTask.run(FutureTask.java:328)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
    at java.lang.Thread.run(Thread.java:1474)



On Mon, Aug 17, 2026 at 10:32 AM Martin Desruisseaux via dev <
[email protected]> wrote:

> Hello all
>
> A pull request which rewrites the Maven JAR Plugin is ready for merge
> and already got some reviews:
>
>     https://github.com/apache/maven-jar-plugin/pull/508
>
> It has been discussed through some channels (GitHub, Slack). This email
> is for bringing attention via another channel in order to see if there
> is objection to the merge.
>
> The major insensitive for the rewrite was to support Java Modules Source
> Hierarchy. This is essential for continuing progress on the Java module
> support. Internally, the major change is that the new implementation
> uses the `jar` tool bundled in the JDK instead of our own Maven Archiver
> (except for generating the `MANIFEST.MF` content, where Maven Archiver
> is still used). It provides advantage such as safer multi-release JAR
> files and enable the use of more options in the future such as module
> hashes.
>
> If there is any comment or objection, please let us known. If none, I
> propose that we merge later this week.
>
> Thanks,
>
>      Martin
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.