简体   繁体   English

在tycho pomless构建中使用JGitVer

[英]Using JGitVer in a tycho pomless build

I would like to use the jgitver maven plugin to automatic define the version of eclipse plugins, features, repository that are built with tycho in pomless mode. 我想使用jgitver maven插件来自动定义使用tychopomless模式下构建的eclipse插件,功能和存储库的版本。

The version management of this 3 plugins are: 这3个插件的版本管理是:

  • jgitver computes a version depending on git tree and tags, create a logical copy of pom, set the new version and associate the new pom to the current plugin in the maven reactor. jgitver根据git树和标签计算版本,创建pom的逻辑副本,设置新版本并将新pom关联到maven反应器中的当前插件。
  • For tycho, version are defined in pom and in manifest.mf or feature.xml files. 对于tycho,版本在pom和manifest.mf或feature.xml文件中定义。 A version consistency check is performed. 执行版本一致性检查。
  • When the pom is not defined, pomless maven generates a temporary pom file named .polyglot.build.properties using versions defined in manifest or feature file. 当未定义pom时,无清单maven使用清单或功能文件中定义的版本生成一个名为.polyglot.build.properties的临时pom文件。 The input path are defined here and depends on PolyglotModelUtil. 输入路径在此处定义并取决于PolyglotModelUtil。

The easier way would be a Jgitver evolution to locally update the feature.xml and manifest.MF. 更简单的方法是通过Jgitver进行本地更新feature.xml和manifest.MF。 It would be a bad idea because a local file would be modified that is not compliant with the plugin philosophy. 这将是一个坏主意,因为将修改不符合插件原理的本地文件。

A better way would be a Jgitver evolution to generate temporary feature.xml and manifest.MF files that would have been updated with the computed version. 更好的方法是通过Jgitver演化生成临时的feature.xml和manifest.MF文件,这些文件已经使用计算版本进行了更新。 Then tycho and tycho-pomless should be forced to use them. 然后应强制使用tycho和tyty-pomless。

It seems to be possible if i succeed in setting a new ModelProcessor.LOCATION option 如果我成功设置了一个新的ModelProcessor.LOCATION选项,这似乎是可能的

Do you think it's an effective way to solve this compatibility problem? 您是否认为这是解决此兼容性问题的有效方法? Do you see an alternative? 您看到其他选择了吗?

Thanks for your help. 谢谢你的帮助。

You could also use directly the jgitver library to participate into your build environment ; 您还可以直接使用jgitver库参与您的构建环境; it is a pure java library. 它是一个纯Java库。 The library is the base of both the maven and gradle plugins. 该库是MavenGradle插件的基础。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM