Skip to content

[MNG-8129] Incorrect relative path in transitive dependencies leads to build failure #9715

Closed as duplicate of#10492
@jira-importer

Description

@jira-importer

Kedar Joshi opened MNG-8129 and commented

I was trying to build Spring Boot v3.3.0 project with latest beta and got following error (which does not occur on v3.9.x) -

 

[ERROR] Internal error: java.nio.file.InvalidPathException: Illegal char <:> at index 10: org.apache:apache -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.nio.file.InvalidPathException: Illegal char <:> at index 10: org.apache:apache
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:157)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:958)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:205)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke(Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 10: org.apache:apache
    at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
    at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
    at sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
    at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
    at java.nio.file.Path.resolve(Path.java:516)
    at org.apache.maven.api.services.PathSource.resolve(PathSource.java:65)
    at org.apache.maven.internal.impl.model.DefaultModelBuilder.getParentPomFile(DefaultModelBuilder.java:1046)
    at org.apache.maven.internal.impl.model.DefaultModelBuilder.readParentLocally(DefaultModelBuilder.java:934)
    at org.apache.maven.internal.impl.model.DefaultModelBuilder.readParent(DefaultModelBuilder.java:904) 

This exception occurs in org.apache.maven.api.services.PathSource#resolve method when parameter relative has value org.apache:apache since on Windows : is not allowed in file names.

In Maven v3.x, this scenario is handled with exists check on the parent file and thus issue does not occur. No such check is done in v4.0.

The source of the issue lies in org.apache:apache declaration in {**}https://repo.maven.apache.org/maven2/org/apache/activemq/artemis-project/2.33.0/artemis-project-2.33.0.pom{**}. As we can see, relative path org.apache:apache does not actually exist. 

 

I am using Windows 10 64 Bit.

 

 


Affects: 4.0.0-beta-3

0 votes, 6 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions