Issue
I want to prepare my RCP app for Java 11. As the app makes SOAP calls, I need to provide the javax.xml.soap
packages in my build. What is the best way to do this?
All calls are done inside one plugin so I did wonder whether to just fetch the jars I need and put them inside that plugin. But wouldn't it be better add these items to the target definition and make it part of the platform?
After some searching I found MOXy
the EclipseLink
project which seems to be what I need. I tried to add this to my target definition but got errors:
${eclipse_home} 1212 plug-ins available
https://download.eclipse.org/rt/eclipselink/updates/
Problems occurred while resolving the target contents
Cannot complete the install because one or more required items could not be found.
Cannot satisfy dependency:
From: EclipseLink MOXy 2.7.7.v20200504-69f2c2b80d (org.eclipse.persistence.moxy.feature.group 2.7.7.v20200504-69f2c2b80d)
To: org.eclipse.equinox.p2.iu; com.sun.mail.jakarta.mail [1.6.4,1.6.4]
Missing requirement: Jakarta Mail API 1.6.4 (com.sun.mail.jakarta.mail 1.6.4) requires 'java.package; javax.crypto 0.0.0' but it could not be found
Software being installed: EclipseLink MOXy 2.7.7.v20200504-69f2c2b80d (org.eclipse.persistence.moxy.feature.group 2.7.7.v20200504-69f2c2b80d)
I am a bit confused as I thought these install-projects pull in dependencies as required. Is that wrong? How do I fix these errors?
Solution
You can add javax.xml.soap from an Eclipse repository. For example insert this into your target definition between the tags
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="javax.xml.soap" version="1.2.0.v201005080501"/>
<repository location="http://download.eclipse.org/releases/2020-12"/>
</location>
Here https://download.eclipse.org/oomph/archive/reports/download.eclipse.org/releases/2020-12/index.html you can explore the repository, on the bottom expand the Installable Units, and there is a filter. If you need anything else from this repository, you only need a new line with unit id and version. If javax.xml.soap depends on some other installable unit, you should be able to find it in this repository.
Answered By - Béla Bálint
Answer Checked By - Katrina (JavaFixing Volunteer)