我有一个第三方eclipse插件,它导出了一些在编译我的其他插件时不应该出现的软件包。
无条件地向下游插件显示这些包(根据此处的约定,它被分类为Accessible)。
一种选择是手动编辑插件并禁止导出的包。 编辑插件对我来说不是一个选项(许可证问题)。
另一种选择是使用-Dosgi.resolverMode = strict VM参数启动。 我也不能使用此选项,因为这会影响我环境中的其他插件。
我的理解可能是错误的。 任何帮助将不胜感激,或欢迎任何其他选择。
例如 :
我有一个名为net.jeeeyul.eclipse.themes_2.2.0.I20140916-113709的插件,它导出以下包
Export-Package: com.google.common.annotations,com.google.common.base,c om.google.common.base.internal,com.google.common.cache,com.google.com mon.collect,com.google.common.escape,com.google.common.eventbus,com.g oogle.common.hash,com.google.common.html,com.google.common.io,com.goo gle.common.math,com.google.common.net,com.google.common.primitives,co m.google.common.reflect,com.google.common.util.concurrent,com.google. common.xml,net.jeeeyul.eclipse.themes,net.jeeeyul.eclipse.themes.css, net.jeeeyul.eclipse.themes.rendering,net.jeeeyul.eclipse.themes.util, org.eclipse.xtend.lib,org.eclipse.xtend.lib.annotations,org.eclipse.x tend2.lib,org.eclipse.xtext.xbase.lib,org.eclipse.xtext.xbase.lib.int ernal,org.eclipse.xtext.xbase.lib.util这不应该发生。 在编译期间,其他插件都不应该看到这些插件。
I have a third party eclipse plug-in which exports few packages which should not be present during compilation of my other plug-ins.
The packages are visible to downstream plug-ins unconditionally (It is classified under Accessible as per the convention here).
One option would be to edit the plug-in manually and make the exported packages forbidden. Editing the plug-in is not an option for me (license issues).
Another option would be to launch with the -Dosgi.resolverMode=strict VM argument. I cannot use this option also as this would impact other plug-ins in my environment.
My understanding might be wrong above. Any help would be greatly appreciated or any other options are welcome.
For example :
I have a plug-in called net.jeeeyul.eclipse.themes_2.2.0.I20140916-113709 which exports the following packages
Export-Package: com.google.common.annotations,com.google.common.base,c om.google.common.base.internal,com.google.common.cache,com.google.com mon.collect,com.google.common.escape,com.google.common.eventbus,com.g oogle.common.hash,com.google.common.html,com.google.common.io,com.goo gle.common.math,com.google.common.net,com.google.common.primitives,co m.google.common.reflect,com.google.common.util.concurrent,com.google. common.xml,net.jeeeyul.eclipse.themes,net.jeeeyul.eclipse.themes.css, net.jeeeyul.eclipse.themes.rendering,net.jeeeyul.eclipse.themes.util, org.eclipse.xtend.lib,org.eclipse.xtend.lib.annotations,org.eclipse.x tend2.lib,org.eclipse.xtext.xbase.lib,org.eclipse.xtext.xbase.lib.int ernal,org.eclipse.xtext.xbase.lib.utilThis should not happen. None of these plug-ins should be visible to other plug-ins during compilation.
最满意答案
在每个下游插件项目中,您可以通过Java Build Path 添加访问规则:转到属性节点Java Build Path> Libraries> Plug-in Dependencies> Access rules 。 尝试此方法时,请参阅组合访问规则 。
In each downstream plugin project you can add access rules via the Java Build Path: Go to the properties node Java Build Path > Libraries > Plug-in Dependencies > Access rules. When trying this approach please consult Combine Access Rules.
更多推荐
发布评论