Eclipse Oxygen plug-in Missing Constraint: Import-Package

被刻印的时光 ゝ 提交于 2020-01-02 06:44:33

问题


I am writing a plug-in for Eclipse Oxygen that allows External Tools to be run directly from toolbar buttons. When I right click the project and click Run As Eclipse Application I get a pop-up that shows the following errors

javax.xml.ws
    Missing Constraint: Import-Package: java.xml.bind; version="0.0.0"
    Missing Constraint: Import-Package: java.xml.bind.annotation; version="0.0.0"
org.apache.xmlrpc
    Missing Constraint: Import-Package: java.xml.bind; version="0.0.0"

If I click Continue, Eclipse launches with the plug-in and it operates correctly. I have tried following the advice here to open the 'Run Configuration' and select 'Add Required Bundles' (although using Add Required Plug-ins as there is no bundles button) but it doesn't help. I neither can see javax.xml.bind in the list nor a way to add it.

The project itself is very simple with the following dependencies

org.eclipse.core.runtime
org.eclipse.debug.ui
org.eclipse.jface

and extensions

org.eclipse.debug.core.launchers
org.eclipse.ui.commands
org.eclipse.ui.handlers
org.eclipse.ui.menus

I have listed the dependency hierarchy and javax.xml.bind is not listed.

How can I add the dependencies or clear the errors?


回答1:


It seems, these two packages (java.xml.bind and java.xml.bind.annotation) are missing in your target platform.

Adding the javax.xml.bind plug-in (which can be download from Eclipse Orbit, e. g. here) to your target platform should fix the problem.



来源:https://stackoverflow.com/questions/47869504/eclipse-oxygen-plug-in-missing-constraint-import-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!