2

ファイルが存在する (そしてフェーズ中に作成された) にもかかわらず、Maven ビルドがinstallフェーズ中に失敗してエラーになります。No such file or directorypackage

[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 アーティファクトが表示されないのはなぜですか? 助けてくれてありがとう。

4

1 に答える 1

2

問題は の親 POM の構成にありbuild-helper-maven-plugin、何らかの理由で という名前でアーティファクトを参照していましたtarget/${project.name}-${project.version}-downstream-test-input.zip<name>が に設定されていたartifactname-segmenterときに、artifactIdが に設定されましたartifactname-segmentation

皆さん、構成を確認してください。

于 2016-01-13T16:07:49.637 に答える