542870: Mylyn is not compatible with Java 11
* added Sun's implementation of JAXB
Change-Id: I586b450ab639cf175f80734cf4ab3986594e9528
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=542870
Signed-off-by: alexei.trebounskikh <alexei.trebounskikh@tasktop.com>
diff --git a/org.eclipse.mylyn.commons-target/mylyn-commons-e4.5.target b/org.eclipse.mylyn.commons-target/mylyn-commons-e4.5.target
index 02462dc..2923a5c 100644
--- a/org.eclipse.mylyn.commons-target/mylyn-commons-e4.5.target
+++ b/org.eclipse.mylyn.commons-target/mylyn-commons-e4.5.target
@@ -7,6 +7,7 @@
<unit id="com.thoughtworks.qdox" version="1.6.3.v20081201-1400"/>
<unit id="javax.activation" version="1.1.0.v201211130549"/>
<unit id="javax.xml.bind" version="2.2.0.v201105210648"/>
+<unit id="com.sun.xml.bind" version="2.2.0.v201505121915"/>
<unit id="javax.xml" version="1.3.4.v201005080400"/>
<unit id="org.apache.commons.codec" version="1.9.0.v20170208-1614"/>
<unit id="org.apache.commons.httpclient" version="3.1.0.v201012070820"/>
diff --git a/org.eclipse.mylyn.commons.notifications-feature/feature.xml b/org.eclipse.mylyn.commons.notifications-feature/feature.xml
index 2752b41..a76b281 100644
--- a/org.eclipse.mylyn.commons.notifications-feature/feature.xml
+++ b/org.eclipse.mylyn.commons.notifications-feature/feature.xml
@@ -31,9 +31,12 @@
</license>
<requires>
- <import plugin="javax.xml.bind" version="2.2.0" match="compatible"/>
+ <!-- Java 11 compatibility -->
<import plugin="javax.activation" version="1.1.0" match="compatible"/>
-
+ <import plugin="javax.xml.bind" version="2.2.0" match="compatible"/>
+ <import plugin="com.sun.xml.bind" version="2.2.0" match="compatible"/>
+ <import plugin="javax.xml.stream" version="1.0.1" match="compatible"/>
+
<import feature="org.eclipse.mylyn.commons" version="3.25.0" match="greaterOrEqual"/>
</requires>
diff --git a/org.eclipse.mylyn.commons.notifications.feed/META-INF/MANIFEST.MF b/org.eclipse.mylyn.commons.notifications.feed/META-INF/MANIFEST.MF
index 036d9f5..0593816 100644
--- a/org.eclipse.mylyn.commons.notifications.feed/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.commons.notifications.feed/META-INF/MANIFEST.MF
@@ -9,9 +9,10 @@
org.eclipse.mylyn.internal.commons.notifications.feed;x-internal:=true
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.commons.core,
- org.eclipse.mylyn.commons.notifications.core
+ org.eclipse.mylyn.commons.notifications.core,
+ javax.xml.bind;bundle-version="2.2.0",
+ com.sun.xml.bind;bundle-version="2.2.0"
Bundle-ClassPath: .
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.bind;version="[0.0.0,2.3.0)"
diff --git a/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedReader.java b/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedReader.java
index 8a49620..96cfcd7 100644
--- a/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedReader.java
+++ b/org.eclipse.mylyn.commons.notifications.feed/src/org/eclipse/mylyn/internal/commons/notifications/feed/FeedReader.java
@@ -49,7 +49,7 @@
public IStatus parse(InputStream in, IProgressMonitor monitor) {
try {
- JAXBContext jc = JAXBContext.newInstance(RSS.class);
+ JAXBContext jc = com.sun.xml.bind.v2.ContextFactory.createContext(new Class[] { RSS.class }, null);
Unmarshaller unmarshaller = jc.createUnmarshaller();
JAXBElement<RSS> rss = unmarshaller.unmarshal(new StreamSource(in), RSS.class);
diff --git a/org.eclipse.mylyn.commons.sdk-feature/feature.xml b/org.eclipse.mylyn.commons.sdk-feature/feature.xml
index 606a18b..1bc97a4 100644
--- a/org.eclipse.mylyn.commons.sdk-feature/feature.xml
+++ b/org.eclipse.mylyn.commons.sdk-feature/feature.xml
@@ -287,7 +287,7 @@
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
+ unpack="false"/>
<plugin
id="javax.activation"
@@ -295,5 +295,19 @@
install-size="0"
version="0.0.0"
unpack="false"/>
-
+
+ <plugin
+ id="com.sun.xml.bind"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="javax.xml.stream"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>