Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.nio.file.NoSuchFileException for nested maven modules #852

Closed
cmposto opened this issue Dec 15, 2022 · 5 comments
Closed

java.nio.file.NoSuchFileException for nested maven modules #852

cmposto opened this issue Dec 15, 2022 · 5 comments
Labels

Comments

@cmposto
Copy link

cmposto commented Dec 15, 2022

Version 2.14.0 introduces a bug for maven modules created in a dedicated/nested dirs.

Example structure (note the aaa and bbb dirs for module-?):

<modules>
    <module>parent</module>
    <module>aaa/module-1</module>
    <module>aaa/module-2</module>
    <module>bbb/module-3</module>
    <module>bbb/module-4</module>
</modules>

Exception is below. The path does not include the group dir:
/local/data/project/module-1
should be:
/local/data/project/**aaa/**module-1

Rollback to 2.13.0 fixes the problem.

[INFO] Updating project parent
[INFO] from version master-SNAPSHOT to 20221215_090230-SNAPSHOT
[INFO]
[ERROR]
java.nio.file.NoSuchFileException: /local/data/project/module-1
at sun.nio.fs.UnixException.translateToIOException (UnixException.java:92)
at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:111)
at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:116)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel (UnixFileSystemProvider.java:215)
at java.nio.file.Files.newByteChannel (Files.java:370)
at java.nio.file.Files.newByteChannel (Files.java:421)
at java.nio.file.spi.FileSystemProvider.newInputStream (FileSystemProvider.java:420)
at java.nio.file.Files.newInputStream (Files.java:155)
at org.codehaus.plexus.util.xml.XmlReader. (XmlReader.java:129)
at org.codehaus.plexus.util.xml.XmlStreamReader. (XmlStreamReader.java:67)
at org.codehaus.plexus.util.ReaderFactory.newXmlReader (ReaderFactory.java:122)
at org.codehaus.mojo.versions.api.PomHelper.readXmlFile (PomHelper.java:1498)
at org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.process (AbstractVersionsUpdaterMojo.java:326)
at org.codehaus.mojo.versions.SetMojo.execute (SetMojo.java:381)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

@slawekjaranowski
Copy link
Member

Please follow #848 looks similar

@cmposto
Copy link
Author

cmposto commented Dec 15, 2022

Ah, just spotted #848. Indeed, possible duplicate issue.

@slawekjaranowski
Copy link
Member

@cmposto I hope that release 2.14.1 has fix for your issue - please confirm.

@jarmoniuk
Copy link
Contributor

@slawekjaranowski it should -- at least to me, it looks like the ../.. case.

@cmposto
Copy link
Author

cmposto commented Dec 16, 2022

Version 2.14.1 is good. Thanks for the quick fix!

@slawekjaranowski slawekjaranowski added this to the next-release milestone Dec 18, 2022
@slawekjaranowski slawekjaranowski removed this from the next-release milestone Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants