使用maven-deploy-plugin部署Eclipse产品

时间:2018-03-01 15:18:42

标签: maven eclipse-plugin eclipse-rcp tycho

我正在尝试将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>

我执行&#39; mvn clean install&#39;构建产品然后部署&#39;在F.如果我这样做,那么我得到错误

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的阶段更改为“安装&#39;我得到了近乎满意的结果。 zip文件和生成的pom将部署到存储库,但构建失败并显示错误

product.qualifier-p2artifacts.xml. Return code is: 400, ReasonPhrase: Bad Request.

为什么当这个文件不在maven-deploy-plugin的文件元素中而被认为部署到存储库时,为什么它不在zip文件所在的目录结构中:target / vs目标/产品/ product.zip?这是因为maven-deploy-plugin是在安装阶段执行的,它会将所有生成的资源作为部署候选者来获取吗?

1 个答案:

答案 0 :(得分:1)

我建议您使用Maven-Tycho来部署Eclipse RCP产品.Tycho通过插件的MANIFEST.MF文件确定插件的依赖关系,并通过在线存储库获取所需的插件包。

您可以查看此git存储库作为示例; rcp - tycho

相关问题