Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用maven tycho插件创建eclipse p2存储库时出现问题_Maven_Tycho - Fatal编程技术网

使用maven tycho插件创建eclipse p2存储库时出现问题

使用maven tycho插件创建eclipse p2存储库时出现问题,maven,tycho,Maven,Tycho,项目结构 com.abc.parent-父pom 包含模块所需的所有插件。以及模块执行列表 com.abc.p2-主p2项目-eclipse存储库 包含category.xml文件,其中包含与下面提到的eclipse插件相关的信息 com.abc.common-eclipse插件 com.abc.person-eclipse插件 我们想要实现的目标 我们将首次为这些项目引入Maven。我们希望使用Maven(主要是使用Maven tycho插件或任何其他标准可用插件)创建P2存储库。此外,我们希

项目结构

com.abc.parent-父pom 包含模块所需的所有插件。以及模块执行列表

com.abc.p2-主p2项目-eclipse存储库 包含category.xml文件,其中包含与下面提到的eclipse插件相关的信息

com.abc.common-eclipse插件

com.abc.person-eclipse插件

我们想要实现的目标

我们将首次为这些项目引入Maven。我们希望使用Maven(主要是使用Maven tycho插件或任何其他标准可用插件)创建P2存储库。此外,我们希望将此存储库发布到站点位置

我们迄今为止所做的尝试

案例1: 方法-我们使用了Maven Tycho插件,并为com.abc.p2项目添加了包装作为“eclipse存储库”。 pom.xml文件中有以下插件 我们正在使用版本为-0.24.0的Maven tycho插件 Maven tycho插件。maven-p2-repository,tycho打包插件,maven osgi插件

    Errors    - 
                [ERROR]     Unknown packaging: eclipse-repository @ line 6, column 14
                [ERROR]
                [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
                ch.
                [ERROR] Re-run Maven using the -X switch to enable full debug logging.
                [ERROR]
                [ERROR] For more information about the errors and possible solutions, please rea
                d the following articles:
                [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
                gException
案例2: 方法-我们使用Maven-p2-plugin来创建p2存储库

    Errors   - 
                We were able to generate the P2-repository structure in the target folder of the master project, , but it failed to package all the dependent modules in the p2-repository.
下一步建议


如果我们在实现目标的正确轨道上,请您提供帮助和建议。如果需要对我的方法进行任何更改以及需要执行的任何其他事项,也请告知我。

为了让tycho正常工作,您需要在项目根目录(根pom.xml所在位置)的
.mvn
文件夹中的
extensions.xml
文件,其中包含以下内容:

<extensions>
<extension>
    <groupId>org.eclipse.tycho.extras</groupId>
    <artifactId>tycho-pomless</artifactId>
    <version>0.26.0</version>
</extension></extensions>

org.eclipse.tycho.extras

要让tycho工作,您需要在项目根目录(根pom.xml所在的位置)的
.mvn
文件夹中有一个
extensions.xml
文件,其中包含以下内容:

<extensions>
<extension>
    <groupId>org.eclipse.tycho.extras</groupId>
    <artifactId>tycho-pomless</artifactId>
    <version>0.26.0</version>
</extension></extensions>

org.eclipse.tycho.extras

我建议使用tycho-p2-repository插件

在案例1中,maven repository插件不知道打包“eclipse repository”,因为打包是由tycho定义的。我建议将maven打包插件从pom中删除,并让tycho应用其默认值

一个有用的提示:Tycho并不包含所有依赖项,即使这是maven的正常行为。由于maven没有“看到”tycho(如此清单派生的)依赖项,因此不包括它们

您可以通过设置为true来覆盖此行为:

<plugin>
 <groupId>org.eclipse.tycho</groupId>
 <artifactId>tycho-p2-repository-plugin</artifactId>
 <version>${tycho-version}</version>
 <configuration>
    <includeAllDependencies>true</includeAllDependencies>
 </configuration>
</plugin>  

org.eclipse.tycho
tycho-p2-repository-plugin
${tycho版本}
真的

我建议使用tycho-p2-repository插件

在案例1中,maven repository插件不知道打包“eclipse repository”,因为打包是由tycho定义的。我建议将maven打包插件从pom中删除,并让tycho应用其默认值

一个有用的提示:Tycho并不包含所有依赖项,即使这是maven的正常行为。由于maven没有“看到”tycho(如此清单派生的)依赖项,因此不包括它们

您可以通过设置为true来覆盖此行为:

<plugin>
 <groupId>org.eclipse.tycho</groupId>
 <artifactId>tycho-p2-repository-plugin</artifactId>
 <version>${tycho-version}</version>
 <configuration>
    <includeAllDependencies>true</includeAllDependencies>
 </configuration>
</plugin>  

org.eclipse.tycho
tycho-p2-repository-plugin
${tycho版本}
真的