解决接触点操作时出错



我正在尝试使用tycho/maven技术为基于Eclipse的产品创建一个P2构建。我们依赖的功能之一包含并使用接触点操作。我们正在从另一种产品中消费它作为供应商依赖。该产品是使用不同的构建工具构建的,因此扩展点位于插件.xml下。 当我们的构建尝试查找该接触点操作时,它会在功能common.p2.manager中查找,该功能既具有依赖于接触点的插件(带有p2.inf文件(,又包含包含接触点的插件。 它正在目标/存储库中查找操作,但此操作实际上是在 common.p2.touchpoint 中。 我们无法弄清楚的是如何直接指向这个插件,或者如何通过第谷将其添加到运行时。 例如,在 POM 中的某个地方,即使它已经在插件中,我们也应该列出这个依赖项.xml? 此外,我们被告知这个接触点仅用于安装时间,那么有没有办法告诉第谷在构建时忽略它? 我们尝试了"mvn verify"命令,但得到的结果与使用"mvn install"命令时的结果相同。 我也尝试将其添加到我的类别.xml文件中以确保它已添加,但这也不起作用。 解决下面显示的错误的任何建议?

接触点 p2.inf 如下所示:

## Ensuring p2 touchpoint plugin installed before this plugin
metaRequirements.0.namespace=org.eclipse.equinox.p2.iu
metaRequirements.0.name=p2.touchpoint
metaRequirements.0.range=[0.0.0,5.0.0)
# During install phase,
#  1--> Set the p2 home dir during install phase of this plugin.
instructions.configure = 
p2.touchpoint.setp2home();
# Unset the p2 home dir during uninstall phase of this plugin.
instructions.uninstall = 
p2.touchpoint.unsetp2home();

此接触点操作由插件调用.xml由扩展点调用:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
class="p2.touchpoint.ProvisioningSetP2Home"
name="setp2home"
touchpointType="org.eclipse.equinox.p2.osgi"
version="1.0.0">
</action>
</extension>
<extension
point="org.eclipse.equinox.p2.engine.actions">
<action
class="p2.touchpoint.ProvisioningUnSetP2Home"
name="unsetp2home"
touchpointType="org.eclipse.equinox.p2.osgi"
version="1.0.0">
</action>
</extension>
</plugin>

错误显示:

An error occurred while configuring the installed items
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Configure, operand=null --> [R]common.p2.manager 4.2.0.v20161115_2041, action=org.eclipse.equinox.internal.p2.engine.MissingAction).
No action found for: common.p2.touchpoint.setp2home.

在我的情况下,这已经修复了丢失的操作错误:

https://www.eclipse.org/lists/tycho-user/msg08039.html

您需要为 tycho-p2-Director 指定一个"独立"运行时 使用自定义接触点。 看 https://www.eclipse.org/tycho/sitedocs/tycho-p2/tycho-p2-director-plugin/materialize-products-mojo.html#directorRuntime

我已使用 tycho-p2-Director 将其添加到插件的 pom.xml:

<configuration>  
<directorRuntime>standalone</directorRuntime>
<source>repository</source>
</configuration>

嗨格雷格 我们已经在使用第谷的 p2 导演插件来构建我们的 P2

<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
<configuration>
<products>
<product>
<id>project</id>
<rootFolder>${rootFolder}</rootFolder>
</product>
</products>
</configuration>
</execution>
<execution>
<phase>pre-integration-test</phase>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
<configuration>
<formats>
<linux>tar.gz</linux>
</formats>
</configuration>
</execution>
</executions>
</plugin>

我们仍然有这个问题。我们在这里错过了什么吗? 问题是,我们没有在我们的代码上消费/构建我们自己的接触点,我们在解决这个插件时遇到了问题,我们正在作为供应商依赖性消费这个插件。

相关内容

最新更新