Bug in property resolution in Maven 4.0.0-rc6?

Thorsten Heit <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.user
Message-ID <[email protected]>
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
OpenPGP_0x5A54BBB878225E08.asc (application/pgp-keys, 3 KB)
-----BEGIN PGP PUBLIC KEY BLOCK-----

xsFNBE1UerIBEADOIKMezkCBDe0CkxPZ0SLk7tYlnHBdC8KIhxHY+AodLK0FBUKV
TLoTT6BqwPqJEr2JUF9v8grNqAPgFnGr9dbE3xkrcUCVjpYXl74iE0HpyTIWmW/b
RTUdzZeI2P4tS6/sfoGcw2rVNIxUGNtowqwRiMUy7E6jK9RvYuDlB0ekB2H9yphM
tiRMf5ndnBWCNYC3ZvXvE3fmXRXHWepEi75HmdUr0qF5mcQtftdFOVbQQ2sHqncd
Zdh60YMeA5AU/GBA8mMjiOUFxxpezLduzaO97ljNHBeiHkjbvLx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c37ZKzyg6
h8a3szLpK3eEzzotEH/VIooz6iCOr4gmzXmZdXtQgkWq3YjRkqAGYkFiEevrY6+w3t2B3BF6weXN
B807vuPvdBZPL+zqEE3S2407Jf12BxfUMWl2WjQGAi2jVf1xIoonvpfsBE8T4ctquMNA+jHSoalf
jyM4S9eDM4PLGGbu6wEnxKC34U8B4f+Q2s6D1FRAZfDnmlRIXB5HlhyKdSmsTh9HW/CixNoY7dM9
OoVW6gq4t++al4pfo5ZTkogoFZqqIQIeDhYKWr81F/n01oQMj7Bmkwj8Hrc8W6HuaMfVDmnw+H1F
97U=
=8cUT
-----END PGP SIGNATURE-----
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.