Maven assembly-plugin“group id'1377585961'太大了”错误

时间:2015-11-20 05:11:04

标签: maven posix maven-assembly-plugin

我试图理解为什么只有一个(新的)MacBookPro在我们的开发团队中运行OS-X 10.10.5,在完成项目的装配阶段时遇到问题,项目中没有其他MacBook正在运行。我想知道是否有其他人遇到这种矛盾的现象,有没有人对此有解释?

这是我们得到的错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly- plugin:2.5.5:single (attachConfig) on project cmr-impl: Execution attachConfig of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single failed: group id '1377585961' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit -> [Help 1]

所以是的,我知道如果我在POM中使用<tarLongFileMode>posix<tarLongFileMode>模式,问题就会消失。但是,在运行相同版本的Java和Maven的任何其他MacBook上都不需要 ,因此它并不是正确的“答案”。我能找到的唯一区别是我的同事都在运行OS-X 10.9.x,但我找不到这种说法在任何方面相关的理由。

为了排除糟糕的Maven库下载或坏插件,我删除了整个.m2/repository目录及其内容(两次或三次),以及apache-maven-3.3.3安装,替换它首先是3.2.1,然后是3.1.1,然后是2.5,最后是3.0.4。不明白。

仅供参考,这与IDE无关。这是命令行“mvn -X clean install”。

请不要只是告诉我使用<tarLongFileMode>posix<tarLongFileMode> - 就像我说的那样,这是已知的,并且它无法解释为什么装配阶段从一台MacBook到另一台非常不合理的行为。

提前致谢。

这是Java版本信息:

$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: /usr/local/apache-maven-3.0.4
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"

这是完整的错误堆栈:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (attachConfig) on project cmr-impl: Execution attachConfig of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single failed: group id '1377585961' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (attachConfig) on project cmr-impl: Execution attachConfig of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single failed: group id '1377585961' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
    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:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution attachConfig of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single failed: group id '1377585961' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.lang.RuntimeException: group id '1377585961' is too big ( > 2097151 ). Use STAR or POSIX extensions to overcome this limit
    at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveOutputStream.failForBigNumber(TarArchiveOutputStream.java:635)
    at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveOutputStream.failForBigNumberWithPosixMessage(TarArchiveOutputStream.java:630)
    at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveOutputStream.failForBigNumbers(TarArchiveOutputStream.java:613)
    at org.codehaus.plexus.archiver.commonscompress.archivers.tar.TarArchiveOutputStream.putArchiveEntry(TarArchiveOutputStream.java:290)
    at org.codehaus.plexus.archiver.tar.TarArchiver.tarFile(TarArchiver.java:330)
    at org.codehaus.plexus.archiver.tar.TarArchiver.execute(TarArchiver.java:189)
    at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:1039)
    at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:437)
    at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:181)
    at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:484)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    ... 20 more
[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] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :cmr-impl

3 个答案:

答案 0 :(得分:5)

这个问题的答案结果是,在标准模式下,该Mac上的用户GroupID号超过了为库代码指定的2097151大小。 OSX GroupID因MacBook代而异。 “posix”可以解决潜在问题的原因是POSIX模式具有更大的可变大小以在内部保存GroupID,而较新的MacBook则不会尝试在其中放入大数字。所以它与Maven-Assembly的功能完全无关,而是与底层库的代码库有关。指定POSIX模式是一种解决方法,而不是一项要求,但可以视为所有POM用例的潜在有效“推荐”,因为它会阻止小众机器在构建阶段失败。

是否会出现因某些其他原因无法指定POSIX的情况,因此这将是一个无用的解决方案?在OS和图书馆的宏伟计划中,这很有可能。

任何选择的解决方案的适当性应始终基于为什么,而不是它偶然会使问题消失而不清楚地理解它是如何实现的。

答案 1 :(得分:0)

对我有用的是添加此posix配置:

/

答案 2 :(得分:0)

上面的答案是正确的。 就我而言,该插件已存在于我的 ui.test/pom.xml

我在 块中替换了以下行。

注意:

                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>${project.basedir}/assembly-ui-test-docker-context.xml</descriptor>
                    </descriptors>
                    
                    <tarLongFileMode>posix</tarLongFileMode>
<!--                <tarLongFileMode>gnu</tarLongFileMode>. -->
                </configuration>```