У меня ошибка сборки Maven во время фазы install
на ошибку No such file or directory
, несмотря на то, что файл существует (и был создан во время фазы package
).Ошибка установки Maven: установка не отображается в упакованном артефакте
[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 сборки-плагин со следующим 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>
Почему установить неисправный увидеть почтовый артефакт? Спасибо за любую помощь.
Обновите версию maven-assembly-plugin, потому что вы используете ее в древней версии ... Кроме того, зачем вам нужен build-helper-maven-plugin? – khmarbaise
Плагин build-helper-maven использовался для прикрепления архивов zip-архивов, сгенерированных с помощью плагина сборки, чтобы их можно было развернуть. И, конечно, я действительно обновил версию. Спасибо за комментарий, но я решил эту проблему; см. ответ ниже. Благодаря! – Suriname0
Если вы правильно используете maven-assembly-plugin, он автоматически присоединяет созданный почтовый индекс или нет, если хотите. – khmarbaise