我正在生成一个 Eclipse 更新站点,并尝试给它一个标签,以便当它出现在用户的站点列表中时,它会显示为名称(例如“Ganymede 项目”),而不是显示为网址。
我在 PDE 或 site.xml 中找不到它的任何参数
我见过的唯一的办法就是让它生成然后手动编辑artifact.xml,但是每次构建时都会变得困惑并且丑陋得要命。
最佳答案
不能 100% 确定这一点,因为我不熟悉 Eclipse 更新站点构建,但此页面:
http://wiki.eclipse.org/Equinox_p2_Metadata_Generator
似乎表明您可以使用 org.eclipse.equinox.p2.metadata.generator.EclipseGenerator 生成更新站点的元数据,其中包含站点名称作为参数:
Arguments describing the output
[...]
-metadataRepositoryNamea user friendly name for the metadata repository
也许这就是您所需要的,为网站生成元数据?请参阅http://wiki.eclipse.org/WTP/What_we_have_learned_(to_love)_about_P2还有:
...Since you have both a content.jar and a site.xml at that location, you actually have two repositories. You have a classic update site, and a p2 repository (these files don't know/care about each other). Classic update sites don't contain a site name (site.xml has no name element), so these sites are "nameless". p2 repositories contain a name element so they have a human-readable name.
关于eclipse - 如何为 Eclipse 更新站点命名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/176854/