[英]How to keep the version in the file name of a library included in a eclipse-plugin with Tycho
I've got an plugin which I'm building with Tycho 0.12.0. 我有一个用Tycho 0.12.0构建的插件。 This plugin has a (snapshot) maven dependency such as
foobar:0.1.1-SNAPSHOT
. 该插件具有(快照)maven依赖项,例如
foobar:0.1.1-SNAPSHOT
。 This dependency is regularly updated (each day). 此依赖关系会定期更新(每天)。 The physical file contains the date and time of the snapshot (foobar-0.1.0-20120507.135021-6.jar).
物理文件包含快照的日期和时间(foobar-0.1.0-20120507.135021-6.jar)。 I want to build with a snapshot because I want to test with the latest dev version.
我想使用快照进行构建,因为我想使用最新的开发版本进行测试。
So, when I build the project, the updated dependency gets copied into the lib/
directory as expected, and the compile and build goes fine. 因此,当我构建项目时,更新的依赖项将按预期方式复制到
lib/
目录中,并且编译和构建正常。
However, the MANIFEST.MF Bundle-ClassPath doesn't get updated, so when the plugin is installed, it doesn't actually work, because the classpath is incorrect. 但是,MANIFEST.MF Bundle-ClassPath不会得到更新,因此,在安装插件时,由于类路径不正确,因此它实际上不起作用。
The solution that I'm currently using is to override the name of the file being written by the maven-dependency-plugin to be foobar-0.1.1-SNAPSHOT.jar
, but I would prefer to keep the full version number of the snapshot so that I can refer to it. 我当前使用的解决方案是将由maven-dependency-plugin写入的文件的名称覆盖为
foobar-0.1.1-SNAPSHOT.jar
,但是我希望保留快照的完整版本号以便我参考。 Is this possible? 这可能吗? Is it possible to update the MANIFEST.MF with the fully qualified name of the SNAPSHOT dependency being used, or would I have to manually manipulate the MANIFEST.MF myself?
是否可以使用正在使用的SNAPSHOT依赖项的完全限定名称来更新MANIFEST.MF,还是我自己必须手动操作MANIFEST.MF?
I can write something to manipulate the MANIFEST.MF myself, but I was wondering if there was a better way to do it. 我可以自己写一些东西来操纵MANIFEST.MF,但是我想知道是否有更好的方法来做。
I would rather strip the version during copy: 我宁愿在复制过程中剥离版本:
http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html#stripVersion http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html#stripVersion
then you have a stable jar file name. 那么您就有了一个稳定的jar文件名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.