2

Has anybody an idea how to define a regular Maven dependency against an artifact that is hosted in an Eclipse P2 repository (e.g http://download.eclipse.org/releases/luna)? The only answer I found was this: Use dependencies from Eclipse p2 repository in a regular Maven build?.

In my case I cannot change from the pom-first approach to the manifest-first approach and especially, I don't want to change the packaging from bundle to eclipse-plugin. Unfortunately, I cannot find any up-to-date releases in any of the public Maven repositories.

The artifacts I am interested in are:

org.eclipse.equinox:org.eclipse.equinox.http.jetty:3.0.200.v20131021-1843 org.eclipse.equinox:org.eclipse.equinox.http.servlet:1.1.500.v20140318-1755

I have tried it with simply defining the Eclipse P2 Repository in my root pom:

<repository>
    <id>eclipse-luna-repository</id>
    <url>http://download.eclipse.org/releases/luna</url>
    <layout>p2</layout>
</repository>

Of course this does not work and I get the following error:

Could not transfer artifact org.eclipse.equinox\:org.eclipse.equinox.http.jetty\:pom\:3.0.200.v20131021-1843 from/to eclipse-luna-repository (http\://download.eclipse.org/releases/luna)\: No connector available to access repository eclipse-luna-repository (http\://download.eclipse.org/releases/luna) of type p2 using the available factories WagonRepositoryConnectorFactory

Has anybody an idea how to solve this problem?

Community
  • 1
  • 1
Herr-Herner
  • 491
  • 6
  • 22
  • Both those artifacts are Eclipse plugins and will probably only work in the Eclipse environment. They both have dependencies on other Eclipse plugins. – greg-449 Dec 29 '14 at 14:34
  • That's right but these dependencies are usual OSGi package dependencies that are easy to handle. Both bundles are "normal" OSGi bundles there are no Eclipse-specifics. – Herr-Herner Dec 29 '14 at 14:53
  • What's wrong with the answer provided in the link you provided? Looks ok to me. – Guillaume Polet Dec 29 '14 at 15:31
  • Really, the Equinox project should simply also publish their bundles in Maven central. There is a [bug requesting this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=365798), but it apparently needs more votes ;-) – oberlies Dec 30 '14 at 09:39
  • The referenced solution does not work properly with the current Tycho release and I don't want to repackge the builds. It should be possible to add a "normal" dependency in other poms in the from of "org.eclipse.equinox:org.eclipse.equinox.http.jetty:3.0.200.v20131021-1843", ... I don't want to work against my internal builds, because these are external third-party artifacts. – Herr-Herner Dec 30 '14 at 10:07
  • Agreed... It is really a drawback that most of the Equinox artifacts are not released in Maven Central or any other public repository . I got so far that I was able to fetch the bundles from the Luna P2 repository copy them to a folder and install them in the local repository. Unfortunalty, this solution is insufficient because it does not allow to reference the artifacts in the form of "org.eclipse.equinox:org.eclipse.equinox.http.jetty:3.0.200.v20131021-1843". – Herr-Herner Dec 30 '14 at 10:13

0 Answers0