maven-assembly-plugin抛出不明确的NullPointerException

时间:2016-05-07 00:53:14

标签: maven maven-3 maven-assembly-plugin

我正在对一些现有项目进行一些重构 - 大多数情况下我们正在从SVN迁移到GIT,并使更大的项目更加模块化。我正在处理的一件工作将我们的本机代码打包到一个程序集中,以便发布到我们的Artifactory中,这样其他项目就可以依赖于那些本机位而无需构建它们。

所以在这一点上......我所做的就是采用现有代码并改组目录,使它们更浅,然后修复各种脚本和路径以引用新路径。这一切似乎都有效 - 但是当我去构建这些程序集时,我收到一个引用TarArchiver.cleanup()第494行的NullPointerError,而没有任何其他帮助来指示可能出错的地方。

任何人都可以提供任何可能出错的信息,如何更好地调试等等?

的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.sri</groupId>
  <artifactId>xsb</artifactId>
  <version>0.0.8349-SNAPSHOT</version>
  <packaging>pom</packaging>

  <properties>
    <artifact.basedir>${project.basedir}/../../build</artifact.basedir>
  </properties>


  <build>
    <plugins>
    <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <descriptors>
            <!-- <descriptor>win32-x64.xml</descriptor> omitted for debugging-->
            <descriptor>cocoa-x64.xml</descriptor>
            <!-- <descriptor>linux-x64.xml</descriptor> omitted for debugging-->
          </descriptors>
            <detail>true</detail>
        </configuration>
        <executions>
            <execution>
                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                <phase>package</phase> <!-- append to the packaging phase. -->
                <goals>
                    <goal>single</goal> <!-- goals == mojos -->
                </goals>
            </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

cocoa-x64.xml(其他描述符几乎相同)

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
  <id>cocoa-x64</id>
  <formats>
    <format>tar.bz2</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>${project.properties.artifact.basedir}/trunk.osx/flserver-build/ext/XSB</directory>
      <outputDirectory>${file.separator}XSB</outputDirectory>
    </fileSet>
  </fileSets>
</assembly>

调试日志

xsb jklo$ mvn -e -X package
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
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"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from /usr/local/Cellar/maven/3.3.9/libexec/conf/settings.xml
[DEBUG] Reading user settings from /Users/jklo/.m2/settings.xml
[DEBUG] Reading global toolchains from /usr/local/Cellar/maven/3.3.9/libexec/conf/toolchains.xml
[DEBUG] Reading user toolchains from /Users/jklo/.m2/toolchains.xml
[DEBUG] Using local repository at /Users/jklo/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for /Users/jklo/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project com.sri:xsb:pom:0.0.8349-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.sri:xsb:pom:0.0.8349-SNAPSHOT
[DEBUG] Tasks:   [package]
[DEBUG] Style:   Regular
[DEBUG] =======================================================================
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xsb 0.0.8349-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project:       com.sri:xsb:0.0.8349-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): [compile]
[DEBUG] Repositories (dependencies): [sunflower (http://artifactory.sri.com/artifactory/sunflower-local, default, releases+snapshots), apache-snapshots (https://repository.apache.org/content/groups/snapshots, default, releases+snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins)     : [central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single (make-assembly)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appendAssemblyId default-value="true">${assembly.appendAssemblyId}</appendAssemblyId>
  <attach default-value="true">${assembly.attach}</attach>
  <basedir default-value="${project.basedir}"/>
  <classifier>${classifier}</classifier>
  <descriptor>${descriptor}</descriptor>
  <descriptorId>${descriptorId}</descriptorId>
  <descriptors>
    <descriptor>cocoa-x64.xml</descriptor>
  </descriptors>
  <dryRun default-value="false">${assembly.dryRun}</dryRun>
  <encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
  <escapeString>${assembly.escapeString}</escapeString>
  <finalName default-value="${project.build.finalName}"/>
  <ignoreDirFormatExtensions default-value="true"/>
  <ignoreMissingDescriptor default-value="false">${assembly.ignoreMissingDescriptor}</ignoreMissingDescriptor>
  <ignorePermissions default-value="false">${assembly.ignorePermissions}</ignorePermissions>
  <includeProjectBuildFilters default-value="true">${assembly.includeProjectBuildFilters}</includeProjectBuildFilters>
  <includeSite default-value="false">${includeSite}</includeSite>
  <localRepository default-value="${localRepository}"/>
  <mavenSession default-value="${session}"/>
  <outputDirectory default-value="${project.build.directory}"/>
  <project default-value="${project}"/>
  <reactorProjects default-value="${reactorProjects}"/>
  <recompressZippedFiles default-value="true"/>
  <remoteRepositories default-value="${project.remoteArtifactRepositories}"/>
  <runOnlyAtExecutionRoot default-value="false">${assembly.runOnlyAtExecutionRoot}</runOnlyAtExecutionRoot>
  <siteDirectory default-value="${project.reporting.outputDirectory}"/>
  <skipAssembly default-value="false">${assembly.skipAssembly}</skipAssembly>
  <tarLongFileMode default-value="warn">${assembly.tarLongFileMode}</tarLongFileMode>
  <tempRoot default-value="${project.build.directory}/archive-tmp"/>
  <updateOnly default-value="false">${assembly.updateOnly}</updateOnly>
  <useJvmChmod default-value="false">${assembly.useJvmChmod}</useJvmChmod>
  <workDirectory default-value="${project.build.directory}/assembly/work"/>
</configuration>
[DEBUG] =======================================================================
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1, ConflictMarker.markTime=0, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=1, ConflictIdSorter.conflictIdCount=0, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=2, ConflictResolver.conflictItemCount=0, DefaultDependencyCollector.collectTime=1, DefaultDependencyCollector.transformTime=6}
[DEBUG] com.sri:xsb:pom:0.0.8349-SNAPSHOT
[INFO]
[INFO] --- maven-assembly-plugin:2.5.3:single (make-assembly) @ xsb ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=2, ConflictMarker.markTime=1, ConflictMarker.nodeCount=248, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=51, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=9, ConflictResolver.conflictItemCount=125, DefaultDependencyCollector.collectTime=668, DefaultDependencyCollector.transformTime=13}
[DEBUG] org.apache.maven.plugins:maven-assembly-plugin:jar:2.5.3:
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.2.1:compile
[DEBUG]    org.apache.maven:maven-core:jar:2.2.1:compile
[DEBUG]       org.apache.maven:maven-settings:jar:2.2.1:compile
[DEBUG]       org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1:compile
[DEBUG]       org.slf4j:slf4j-jdk14:jar:1.5.6:runtime
[DEBUG]          org.slf4j:slf4j-api:jar:1.5.6:runtime
[DEBUG]       org.slf4j:jcl-over-slf4j:jar:1.5.6:runtime
[DEBUG]       org.apache.maven.reporting:maven-reporting-api:jar:2.2.1:compile
[DEBUG]          org.apache.maven.doxia:doxia-sink-api:jar:1.1:compile
[DEBUG]          org.apache.maven.doxia:doxia-logging-api:jar:1.1:compile
[DEBUG]       org.apache.maven:maven-profile:jar:2.2.1:compile
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]          junit:junit:jar:3.8.1:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
[DEBUG]       org.apache.maven:maven-error-diagnostics:jar:2.2.1:compile
[DEBUG]       commons-cli:commons-cli:jar:1.2:compile
[DEBUG]       org.apache.maven:maven-plugin-descriptor:jar:2.2.1:compile
[DEBUG]       org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
[DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
[DEBUG]          backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
[DEBUG]       org.apache.maven:maven-monitor:jar:2.2.1:compile
[DEBUG]       classworlds:classworlds:jar:1.1:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.apache.maven:maven-project:jar:2.2.1:compile
[DEBUG]       org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
[DEBUG]    org.apache.maven:maven-artifact:jar:2.2.1:compile
[DEBUG]    org.apache.maven:maven-model:jar:2.2.1:compile
[DEBUG]    org.apache.maven.shared:maven-common-artifact-filters:jar:1.4:compile
[DEBUG]    org.codehaus.plexus:plexus-interpolation:jar:1.22:compile
[DEBUG]    org.codehaus.plexus:plexus-archiver:jar:2.9.1:compile
[DEBUG]       org.apache.commons:commons-compress:jar:1.9:compile
[DEBUG]    org.apache.maven.shared:file-management:jar:1.1:compile
[DEBUG]    org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[DEBUG]       org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6:compile
[DEBUG]    commons-io:commons-io:jar:2.2:compile
[DEBUG]    org.apache.maven.shared:maven-filtering:jar:1.3:compile
[DEBUG]       org.apache.maven.shared:maven-shared-utils:jar:0.6:compile
[DEBUG]          com.google.code.findbugs:jsr305:jar:2.0.1:compile
[DEBUG]       org.sonatype.plexus:plexus-build-api:jar:0.0.4:compile
[DEBUG]    org.codehaus.plexus:plexus-io:jar:2.4.1:compile
[DEBUG]    org.apache.maven:maven-archiver:jar:2.5:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.21:compile
[DEBUG]    org.apache.maven.shared:maven-repository-builder:jar:1.0:compile
[DEBUG]       commons-codec:commons-codec:jar:1.6:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-assembly-plugin:2.5.3
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-assembly-plugin:2.5.3
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-assembly-plugin:2.5.3
[DEBUG]   Included: org.apache.maven.plugins:maven-assembly-plugin:jar:2.5.3
[DEBUG]   Included: org.slf4j:slf4j-jdk14:jar:1.5.6
[DEBUG]   Included: org.slf4j:jcl-over-slf4j:jar:1.5.6
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:2.2.1
[DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.1
[DEBUG]   Included: org.apache.maven.doxia:doxia-logging-api:jar:1.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: commons-cli:commons-cli:jar:1.2
[DEBUG]   Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG]   Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.apache.maven.shared:maven-common-artifact-filters:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.22
[DEBUG]   Included: org.codehaus.plexus:plexus-archiver:jar:2.9.1
[DEBUG]   Included: org.apache.commons:commons-compress:jar:1.9
[DEBUG]   Included: org.apache.maven.shared:file-management:jar:1.1
[DEBUG]   Included: org.apache.maven.shared:maven-shared-io:jar:1.1
[DEBUG]   Included: commons-io:commons-io:jar:2.2
[DEBUG]   Included: org.apache.maven.shared:maven-filtering:jar:1.3
[DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:0.6
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.1
[DEBUG]   Included: org.sonatype.plexus:plexus-build-api:jar:0.0.4
[DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:2.4.1
[DEBUG]   Included: org.apache.maven:maven-archiver:jar:2.5
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.21
[DEBUG]   Included: org.apache.maven.shared:maven-repository-builder:jar:1.0
[DEBUG]   Included: commons-codec:commons-codec:jar:1.6
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-assembly-plugin:2.5.3, parent: sun.misc.Launcher$AppClassLoader@6d6f6e28]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single' with basic configurator -->
[DEBUG]   (s) appendAssemblyId = true
[DEBUG]   (f) attach = true
[DEBUG]   (s) basedir = /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb
[DEBUG]   (s) descriptors = [cocoa-x64.xml]
[DEBUG]   (f) dryRun = false
[DEBUG]   (s) finalName = xsb-0.0.8349-SNAPSHOT
[DEBUG]   (f) ignoreDirFormatExtensions = true
[DEBUG]   (s) ignoreMissingDescriptor = false
[DEBUG]   (f) ignorePermissions = false
[DEBUG]   (f) includeProjectBuildFilters = true
[DEBUG]   (s) includeSite = false
[DEBUG]   (s) localRepository =       id: local
      url: file:///Users/jklo/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]

[DEBUG]   (f) mavenSession = org.apache.maven.execution.MavenSession@62d0ac62
[DEBUG]   (s) outputDirectory = /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/target
[DEBUG]   (f) project = MavenProject: com.sri:xsb:0.0.8349-SNAPSHOT @ /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/pom.xml
[DEBUG]   (s) reactorProjects = [MavenProject: com.sri:xsb:0.0.8349-SNAPSHOT @ /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/pom.xml]
[DEBUG]   (f) recompressZippedFiles = true
[DEBUG]   (f) remoteRepositories = [      id: sunflower
      url: http://artifactory.sri.com/artifactory/sunflower-local
   layout: default
snapshots: [enabled => true, update => daily]
 releases: [enabled => true, update => daily]
,       id: apache-snapshots
      url: https://repository.apache.org/content/groups/snapshots
   layout: default
snapshots: [enabled => true, update => daily]
 releases: [enabled => true, update => daily]
,       id: central
      url: https://repo.maven.apache.org/maven2
   layout: default
snapshots: [enabled => false, update => daily]
 releases: [enabled => true, update => daily]
]
[DEBUG]   (f) runOnlyAtExecutionRoot = false
[DEBUG]   (s) siteDirectory = /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/target/site
[DEBUG]   (f) skipAssembly = false
[DEBUG]   (s) tarLongFileMode = warn
[DEBUG]   (s) tempRoot = /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/target/archive-tmp
[DEBUG]   (f) updateOnly = false
[DEBUG]   (f) useJvmChmod = false
[DEBUG]   (s) workDirectory = /Users/jklo/projects/RAVE/source/sunflower-native/sunflower-native-build/floralib.artifacts/xsb/target/assembly/work
[DEBUG] -- end configuration --
[INFO] Reading assembly descriptor: cocoa-x64.xml
[DEBUG] Field directory source: ${project.properties.artifact.basedir}/trunk.osx/flserver-build/ext/XSB interpolated to: ../../build/trunk.osx/flserver-build/ext/XSB
[DEBUG] After assembly is interpolated:

<?xml version="1.0"?>
<assembly xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
    xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <id>cocoa-x64</id>
  <formats>
    <format>tar.bz2</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <outputDirectory>${file.separator}XSB</outputDirectory>
      <directory>../../build/trunk.osx/flserver-build/ext/XSB</directory>
    </fileSet>
  </fileSets>
</assembly>



[DEBUG] All known ContainerDescriptorHandler components: [file-aggregator, metaInf-services, plexus, metaInf-spring]
[DEBUG] No ArtifactResolver with hint project-cache-aware
[DEBUG] FileSet[XSB/] dir perms: -1 file perms: -1
[DEBUG] The archive base directory is 'null'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.511 s
[INFO] Finished at: 2016-05-06T17:24:42-07:00
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single (make-assembly) on project xsb: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single (make-assembly) on project xsb: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single failed.
    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:497)
    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)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.5.3:single failed.
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more
Caused by: java.lang.NullPointerException
    at org.codehaus.plexus.archiver.tar.TarArchiver.cleanUp(TarArchiver.java:494)
    at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:965)
    at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:436)
    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:134)
    ... 21 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

3 个答案:

答案 0 :(得分:1)

原来我的问题与:

有关
if (strstr(input_buffer, "\n") == NULL) {
    // error, input didn't fit in our buffer!
}

我在一条 <properties> <artifact.basedir>${project.basedir}/../../build</artifact.basedir> </properties> 的路上走了,因此我的有效路径应该是:

../

它有点蹩脚,因为只要这个插件存在,它就不能提供更好的错误处理功能,就像一条糟糕的路径一样微不足道。

答案 1 :(得分:0)

问题可能是未在maven-assembly-plugin配置上设置存档基目录。请尝试将<archiveBaseDirectory>添加到当前maven程序集配置:

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.5.3</version>
    <configuration>
      <archiveBaseDirectory>${project.basedir}</archiveBaseDirectory>

      <descriptors>
      ...
      </descriptors>
        <detail>true</detail>
    </configuration>
    <executions>
      ...
    </executions>
  </plugin>
</plugins>

答案 2 :(得分:0)

我有同样的问题,原因不同。我的maven程序集插件正在构建目录中创建tar.gz,正如我之前多次构建此项目一样,通常那里已经存在一个tar.gz,新构建会覆盖它。原来我一直在使用7zip来检查以前的tar.gz。当我触发新版本时,该文件仍在7zip中打开,因此maven插件无法删除旧的tar.gz。对于任何关注此问题的人来说,这是另一件事。