0

Hello I get the following errors when trying to 'maven install' my feature based product:

[ERROR] Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse-repo' from location https://download.eclipse.org/eclipse/updates/4.20/: Unable to read repository at https://download.eclipse.org/eclipse/updates/4.20/compositeContent.xml. Unable to make public void sun.security.ssl.SSLSocketImpl.setHost(java.lang.String) accessible: module java.base does not "exports sun.security.ssl" to unnamed module @5840a6ee -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse-repo' from location https://download.eclipse.org/eclipse/updates/4.20/
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:120)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

Apart from the suggestions from Unable to read repository at http://download.eclipse.org/releases/indigo I havent found much useful information what might be the reason for the error. Thanks for your help!

umpapa
  • 55
  • 1
  • 8
  • With which Java version do you run Maven and which version of Tycho do you use? If it's Java 17, try Java 11 or 16. Otherwise, update Tycho. – howlger Oct 05 '21 at 11:42
  • Thank you, updating tycho did the trick! Follow-up quesiton: now I have this error in one of my plugins: `[INFO] Resolving dependencies of MavenProject: myplugin:1.0.0-SNAPSHOT @ C:\...\pom.xml [INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86} [ERROR] Software being installed: myplugin 1.0.0.qualifier [ERROR] Missing requirement: myplugin 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.xtext 0.0.0' but it could not be found ` The plugin is part of a feature in which I did add the requirement in the dependecy folder. – umpapa Oct 05 '21 at 15:53
  • I combined all my plugins in a feature, added the required dependencies, added a product configuration and a parent project(added plugin-, feature- and product project as module here). Should that be theoretically sufficient or do I also have to add a target project?( which I read of when trying to find the errror) – umpapa Oct 05 '21 at 16:01
  • `org.eclipse.xtext` is missing in the target platform. Yes, a target platform definition is recommended. See [this Tycho tutorial](https://www.vogella.com/tutorials/EclipseTycho/article.html) with [this example project](https://github.com/vogellacompany/tycho-example). A bit simpler is [my customized Eclipse IDE _IDEalized_](https://github.com/howlger/IDEalized). – howlger Oct 05 '21 at 17:43
  • thank you that helped! I added some p2 repos to fullfill requirements, but now another requirement is "com.atlassian.commonmark" for which I cannot find a p2 repo to download. Is there another way to download requirements? – umpapa Oct 06 '21 at 11:19
  • Unfortunately, for Eclipse/OSGi plugins/bundles there is no such thing like the Maven Central Repository. I don't know where to get `com.atlassian.commonmark` as OSGi bundle. Since [Tycho 2.2.0](https://github.com/eclipse/tycho/blob/master/RELEASE_NOTES.md#220) there is a [way to consume artifacts from a Maven repository](https://läubisoft.gmbh/en/articles/using-maven-artifacts-in-pde-rcp-and-tycho-builds/) (in case `com.atlassian.commonmark` does not exist as OSGi bundle). – howlger Oct 06 '21 at 13:33
  • I tried that but the error says explicitly "requires '**osgi.bundle**; com.atlassian.commonmark 0.0.0'", so the error remains. The plugin that requires this bundle is itself a requirement that I downloaded as p2 repo. Isnt there a way to tell to download everything that this repo needs as well? Or maybe any other idea for a work around? Thank you very much for your help! – umpapa Oct 06 '21 at 15:00
  • P.S. the plugin that needs atlassian.commonmark is epsilon.picto – umpapa Oct 06 '21 at 15:04
  • I thought this is worth a new question https://stackoverflow.com/questions/69478939/missing-requirement-not-available-as-osgi-bundle – umpapa Oct 07 '21 at 09:44

0 Answers0