由于版本限定符,同一产品的两个功能中的相同插件会导致冲突

康本

我使用Tycho构建多个Eclipse产品。我在詹金斯(Jenkins)的每个应用程序功能中都有一份工作,此外还有一份用于实用程序和一份针对产品。

下图描述了我的设置: 依存关系

在一项工作('A')中,我构建了一个插件('a')。其版本具有“限定符”占位符。此插件包含在两个不相关的功能中,每个功能都内置在一个单独的作业中(“ B”和“ C”)。这2个作业还构建了特定的插件。最后,我有一个工作“ D”,其中,我的应用程序是使用这两个功能组装而成的。

Both features declare their dependency on the plugin with the special version "0.0.0", i.e. latest version. At compile time, each feature obtains the a.plugin and changes its qualifier. This leads to different qualifiers in each feature.

I sometimes experience the following error, leading my build to fail:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: product.d 1.0.0
[ERROR]   Only one of the following can be installed at once: [plugin.a 1.2.3.1234, plugin.a 1.2.3.5678]
[ERROR]   Cannot satisfy dependency: product.d 1.0.0 depends on: feature.b 0.0.0
[ERROR]   Cannot satisfy dependency: product.d 1.0.0 depends on: feature.c 0.0.0
[ERROR]   Cannot satisfy dependency: feature.b 1.0.0 depends on: plugin.a [1.2.3.1234]
[ERROR]   Cannot satisfy dependency: feature.c 1.0.0 depends on: plugin.a [1.2.3.5678]

Thus plugin.a being compiled only once, do you know what I could do to have my product resolve this false conflict?

oberlies

A feature build doesn't change the qualifier of the plug-ins; it uses the plug-in which is available in the target platform without modification. The feature build only modifies files which go into the feature JAR, e.g. it replaces the version in reference to plug-ins with the available version in the feature.xml.

So in case of the described failure in the build of job D, your feature build jobs have seen different versions of plugin.a. This e.g. happens when your jobs build in this order: A (builds plugin.a_1.2.3.1234) - B - A (builds plugin.a_1.2.3.5678) - C - D. When this happens, there is no way that the build of the product (job D) can succeed.

But really the question you should be asking yourself is if you really need this complicated setup. A feature build is close to a NOP in Tycho, so you could just always build your features together with the plug-in(s) in job A.

有潜在的方法甚至可以使复杂的作业设置可靠地工作,例如,通过使用插件引用替换功能之一中的插件,或使用基于SCM的可复制构建限定符(非常高级!)。但是,在您的情况下,所有这些选择似乎都不值得付出努力。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

BigTable:来自不同列族的两个列限定符可以具有相同的名称吗?

如何使用R在带有两个双引号的csv中读取作为文本限定符?

使用相同的系列将多个版本存储在hbase行中:限定符,但时间戳不同。

在同一测试中模拟对相同功能的两个单独响应

同一功能中两个Select2的多个占位符

使用sbt-git生成软件包会导致“ SNAPSHOT-SNAPSHOT”版本限定符

nixOS:如何从相同软件包,相同版本的两个实例之间的冲突中恢复

wsimport-两个声明导致冲突,给定同一行

在同一框架中绘制两个功能

在同一互斥锁上使用两个std :: unique_lock会导致死锁?

仅定义一个屏幕密度限定符?

链接到同一库的两个版本(相同的符号)

相同的const类型限定符

BigTable:列限定符或时间戳过滤器会导致全扫描吗?

当将一个对象复制到另一个对象时,为什么C ++要求两个对象都具有低级const限定符?

相同功能的两个版本(用于内联或constexpr)

在同一JVM中启动两个spring应用程序会导致日志行增加一倍

是否有任何建议统一功能类型限定符并简化可恶的功能类型?

wsimport两个声明导致冲突

在一行中为同一类的两个对象调用相同的方法

Kubernetes在同一子域中部署两个微服务会导致频繁和随机的404错误

Java:在两个线程中加载相同的动态库(两个线程都在同一JVM中)

React和React Router,使用不同的道具两次渲染同一元素会导致两个具有相同道具的元素?

两个相同的元素需要执行相同的功能,但存在冲突

重载==运算符导致丢弃限定符错误

警告C4114:同一类型限定符已使用多次

程序链接到同一库的两个版本?

两个boost版本之间的冲突

安装Xcode 5.1后出现错误:同一层次结构中的两个视图具有相同的还原标识符