Linux上的maven-assembly“无法创建目录或父目录”

时间:2019-06-03 09:25:56

标签: maven

我有一个项目,其中包含3个使用Maven的模块,但是每次出现一个奇怪的错误,其中一个模块就会失败。

我想这可能是插件错误(maven-assembly-plugin),我尝试了我能想到的几乎所有方法,重新下载了依赖项,清理,安装,编辑pom尽可能简单... < / p>

此模块的构建在Windows(10)上运行良好,但在Linux(CentOs)上运行不正常:(

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (my-package) on project my-module: Failed to create assembly: Error creating assembly archive bundle-oozie: Unable to create directory or parent directory of /home/myuser/IdeaProjects/project/my-module/target/my-package/my-package/../../23321.project.seq -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (my-package) on project my-module: Failed to create assembly: Error creating assembly archive bundle-oozie: Unable to create directory or parent directory of /home/myuser/IdeaProjects/project/my-module/target/my-package/my-package/../../23321.project.seq
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    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)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive bundle-oozie: Unable to create directory or parent directory of /home/myuser/IdeaProjects/project/my-module/target/my-package/my-package/../../23321.project.seq
    at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:532)
    at org.apache.maven.plugins.assembly.mojos.SingleAssemblyMojo.execute(SingleAssemblyMojo.java:61)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 21 more
Caused by: org.apache.maven.plugins.assembly.archive.ArchiveCreationException: Error creating assembly archive bundle-oozie: Unable to create directory or parent directory of /home/myuser/IdeaProjects/project/my-module/target/my-package/my-package/../../23321.project.seq
    at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:188)
    at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:478)
    ... 24 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: Unable to create directory or parent directory of /home/myuser/IdeaProjects/project/my-module/target/my-package/my-package/../../23321.project.seq
    at org.codehaus.plexus.archiver.dir.DirectoryArchiver.copyFile(DirectoryArchiver.java:151)
    at org.codehaus.plexus.archiver.dir.DirectoryArchiver.execute(DirectoryArchiver.java:98)
    at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:987)
    at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:445)
    at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:184)
    ... 25 more

0 个答案:

没有答案