Hi,

I was giving Maven 4.0.0-rc6 a try on an internal multimodule project and faced a strange phenomenon; I hope someone can shed a light on what's going on...

The project itself consists of several modules with some having inter-module dependencies, and a few of them use the assembly plugin to create a zip distribution. The structure is basically the following:

main pom:
- lists all modules
- defines build plugins with versions in the plugin management section
- has a dependencyManagement section to define the versions of the dependencies used in the modules


The modules in question are:
* app.common
  contains common model and utility classes

* app.server
  - implements the Jakarta RS server part of the application
  - depends (among other things) on app.common

* app.http2module.undertow
  - contains a configurator for Undertow to allow for working in HTTP/2
  - depends on
    +- org.jboss.resteasy:resteasy-undertow-cdi
    \- io.smallrye:jandex:jar

* app.server.resteasy
- contains code to start the server with RESTeasy as Jakarta RS implementation
  - depends on
    +- app.server
    +- org.jboss.resteasy:resteasy-undertow-cdi
    +- app.http2module.undertow
    and a few others
  - uses the assembly plugin to build a zip distribution



With Maven 3.9.16 and 3.10.0-rc1, "mvn clean verify" works on the whole project, but with Maven 4.0.0-rc6 the build fails in the app.server.resteasy module when building the assembly:


(...)
[INFO] Reading assembly descriptor: src/main/assembly/zip.xml
[DEBUG] After assembly is interpolated:

<?xml version="1.0" encoding="UTF-8"?>
<assembly xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd"; xmlns="http://maven.apache.org/ASSEMBLY/2.2.0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <id>zip</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <outputDirectory>lib-${project.version}</outputDirectory>
    </dependencySet>
  </dependencySets>
</assembly>



[DEBUG] All known ContainerDescriptorHandler components: [plexus, metaInf-services, metaInf-spring, file-aggregator] [INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Reactor Summary for Testserver 1.4.2-SNAPSHOT:
[INFO]
[INFO] ...
[INFO] app.server.resteasy .................................................................................. FAILURE [ 0.996 s]
[INFO] ...
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  16.055 s
[INFO] Finished at: 2026-08-24T14:40:50+02:00
[INFO] -------------------------------------------------------------------------------------------------------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.8.0:single (default) on project app.server.resteasy: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.8.0:single failed: Invalid Dependency Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)]: Invalid Collect Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.8.0:single (default) on project app.server.resteasy: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.8.0:single failed: Invalid Dependency Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)] at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:346) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
    (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-assembly-plugin:3.8.0:single failed: Invalid Dependency Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:159) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:339)
    (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) Caused by: java.lang.IllegalArgumentException: Invalid Dependency Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)] at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateDependencyRequest(DefaultRepositorySystemValidator.java:229) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveTransitive(DefaultDependencyResolver.java:240) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.updateDependencySetResolutionRequirements(DefaultDependencyResolver.java:193)
    (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) Caused by: java.lang.IllegalArgumentException: Invalid Collect Request: null -> [com.example.app:app.server:jar:1.4.2-SNAPSHOT (compile), org.jboss.resteasy:resteasy-undertow-cdi:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-jackson2-provider:jar:7.0.3.Final (runtime), org.jboss.resteasy:resteasy-validator-provider:jar:7.0.3.Final (runtime), org.glassfish.expressly:expressly:jar:6.0.0 (runtime), com.example.app:app.http2module.undertow:jar:1.4.2-SNAPSHOT (runtime)] < [artifactory-mirror (https://.../mirror, default, releases), snapshots (https://.../libs-snapshot, default, releases+snapshots)] at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.mayThrow(DefaultRepositorySystemValidator.java:62) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateCollectRequest(DefaultRepositorySystemValidator.java:220) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateDependencyRequest(DefaultRepositorySystemValidator.java:227) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveTransitive(DefaultDependencyResolver.java:240) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.updateDependencySetResolutionRequirements(DefaultDependencyResolver.java:193)
    (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) Suppressed: java.lang.IllegalArgumentException: Not fully interpolated dependency jakarta.websocket:jakarta.websocket-api:jar:${version.jakarta.websocket.jakarta-websocket-api} () at org.apache.maven.impl.resolver.validator.MavenValidator.validateDependency(MavenValidator.java:85) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateCollectRequest(DefaultRepositorySystemValidator.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateDependencyRequest(DefaultRepositorySystemValidator.java:227) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveTransitive(DefaultDependencyResolver.java:240) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.updateDependencySetResolutionRequirements(DefaultDependencyResolver.java:193)
        (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) Suppressed: java.lang.IllegalArgumentException: Not fully interpolated dependency jakarta.websocket:jakarta.websocket-client-api:jar:${version.jakarta.websocket.jakarta-websocket-api} () at org.apache.maven.impl.resolver.validator.MavenValidator.validateDependency(MavenValidator.java:85) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateCollectRequest(DefaultRepositorySystemValidator.java:207) at org.eclipse.aether.internal.impl.DefaultRepositorySystemValidator.validateDependencyRequest(DefaultRepositorySystemValidator.java:227) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:333) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveTransitive(DefaultDependencyResolver.java:240) at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.updateDependencySetResolutionRequirements(DefaultDependencyResolver.java:193)
        (...)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]



I could trace that down to the following declaration inside the main pom's dependencyManangement section:

<dependency>
    <groupId>io.undertow</groupId>
    <artifactId>undertow-dist</artifactId>
    <version>2.4.1.Final</version>
    <scope>import</scope>
    <type>pom</type>
</dependency>

When I replace this by

<dependency>
    <groupId>io.undertow</groupId>
    <artifactId>undertow-core</artifactId>
    <version>2.4.1.Final</version>
</dependency>

because that's the only dependency I'm actually using, everything works.


Is this intentionally? A change that comes with Maven 4? Or something completely different?



Regards

Thorsten

Attachment: OpenPGP_0x5A54BBB878225E08.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to