【发布时间】:2018-08-09 16:59:49
【问题描述】:
我正在尝试将 Eclipse 产品部署到 Nexus 存储库。我有点成功,但仍然遇到一些我不知道如何处理的错误。
我在构建产品的功能 (F) 中使用 maven-deploy-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>deploy-file</goal>
</goals>
<configuration>
<repositoryId>snapshots</repositoryId>
<packaging>zip</packaging>
<generatePom>true</generatePom>
<url>http://repo:8081/nexus/content/repositories/snapshots</url>
<groupId>my.group</groupId>
<artifactId>my.artifact</artifactId>
<version>1.0.0-SNAPSHOT</version>
<file>
target/products/product.zip
</file>
</configuration>
</execution>
</executions>
</plugin>
我执行“mvn clean install”来构建产品,然后在 F 上执行“mvn deploy”。如果我这样做了,我会收到错误
Exception while publishing product /home/akravets/dev/workspaces/trunk/my.repository.feature/myProduct.product: publishing result: [Included element my.product.feature.feature.group 8.0.1.R20180301-1431 is missing. Cannot determine filter for requirement to this element.] -> [Help 1]
我已阅读有关此问题的讨论,但似乎与我的问题无关,因为除了 maven-deploy-plugin 中的部署阶段之外,我没有任何已定义的部署阶段。
如果我将 maven-deploy-plugin 的阶段更改为“安装”,我会得到几乎令人满意的结果。 zip 文件和生成的 pom 被部署到存储库,但构建失败并出现错误
product.qualifier-p2artifacts.xml. Return code is: 400, ReasonPhrase: Bad Request.
为什么当这个文件不在 maven-deploy-plugin 的文件元素中并且不在 zip 文件所在的目录结构中时,它甚至被认为是部署到存储库:target/ vs target/product/product.zip?这是因为 maven-deploy-plugin 是在安装阶段执行的,它会选择所有生成的资源作为部署的候选者吗?
【问题讨论】:
标签: maven eclipse-plugin eclipse-rcp tycho