尽管文件存在(并且是在阶段期间创建的),但我有一个 Maven 构建在install
阶段失败并出现错误。No such file or directory
package
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (lev-sys-test-output) @ artifactname-segmentation ---
[INFO] Building zip: /home/username/artifactname/sphinxsegmentation/target/artifactname-segmentation-0.0.1-SNAPSHOT-downstream-test-input.zip
[WARNING] Assembly file: /home/username/artifactname/sphinxsegmentation/target/artifactname-segmentation-0.0.1-SNAPSHOT-downstream-test-input.zip is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ artifactname-segmentation ---
[INFO] Installing /home/username/artifactname/sphinxsegmentation/target/artifactname-segmentation-0.0.1-SNAPSHOT.jar to /devel/asr/bin/m2repo/package/name/sphinxsegmentation/artifactname-segmentation/0.0.1-SNAPSHOT/artifactname-segmentation-0.0.1-SNAPSHOT.jar
[INFO] Installing /home/username/artifactname/sphinxsegmentation/pom.xml to /devel/asr/bin/m2repo/package/name/sphinxsegmentation/artifactname-segmentation/0.0.1-SNAPSHOT/artifactname-segmentation-0.0.1-SNAPSHOT.pom
[INFO] Installing /home/username/artifactname/sphinxsegmentation/target/artifactname-segmentation-0.0.1-SNAPSHOT-sources.jar to /devel/asr/bin/m2repo/package/name/sphinxsegmentation/artifactname-segmentation/0.0.1-SNAPSHOT/artifactname-segmentation-0.0.1-SNAPSHOT-sources.jar
[INFO] Installing /home/username/artifactname/sphinxsegmentation/target/artifactname-segmentation-0.0.1-SNAPSHOT-tests.jar to /devel/asr/bin/m2repo/package/name/sphinxsegmentation/artifactname-segmentation/0.0.1-SNAPSHOT/artifactname-segmentation-0.0.1-SNAPSHOT-tests.jar
[INFO] Installing /home/username/artifactname/sphinxsegmentation/target/artifactname-segmenter-0.0.1-SNAPSHOT-downstream-test-input.zip to /devel/asr/bin/m2repo/package/name/sphinxsegmentation/artifactname-segmentation/0.0.1-SNAPSHOT/artifactname-segmentation-0.0.1-SNAPSHOT-downstream-test-input.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.992 s
[INFO] Finished at: 2016-01-13T10:13:42-05:00
[INFO] Final Memory: 41M/975M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-install) on project artifactname-segmentation: Failed to install artifact package.name.sphinxsegmentation:artifactname-segmentation:zip:downstream-test-input:0.0.1-SNAPSHOT: /home/username/artifactname/sphinxsegmentation/target/artifactname-segmenter-0.0.1-SNAPSHOT-downstream-test-input.zip (No such file or directory) -> [Help 1]
文件系统确认文件系统上/home/username/artifactname/sphinxsegmentation/target/artifactname-segmenter-0.0.1-SNAPSHOT-downstream-test-input.zip
存在,并且仅通过package
阶段执行成功。
除了默认的 maven-install-plugin 之外,没有任何插件绑定到安装阶段。artifactname-segmenter-0.0.1-SNAPSHOT-downstream-test-input.zip
由 maven-assembly-plugin 执行产生,具有以下内容descriptorRefs
:
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>downstream-test-input</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>./</directory>
<outputDirectory>./</outputDirectory>
<excludes>
<exclude>*/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/target/mr-test-output</directory>
<outputDirectory>./</outputDirectory>
<includes>
<include>*/**/*.avro</include>
</includes>
</fileSet>
</fileSets>
</assembly>
为什么安装无法看到 zip 工件?感谢您的任何帮助。