flavio.donze
flavio.donze

Reputation: 8100

Eclipse OSGi or RCP application with Maven dependencies instead of TargetPlatform

Using Eclipse as an IDE, is it possible to use the maven dependency management instead of a PDE target platform? Without PDE TargetPlatform the bundles are missing in the launch configuration.

Since it is possible to declare the same update-sites in the pom file, it would be much more convenient adding dependencies through Maven.

<repositories>
    <repository>
        <id>eclipse-neon</id>
        <layout>p2</layout>
        <url>http://download.eclipse.org/releases/neon</url>
    </repository>
    <repository>
        <id>eclipse-2018-12</id>
        <layout>p2</layout>
        <url>http://download.eclipse.org/releases/2018-12</url>
    </repository>
</repositories>

Resolving dependencies is also much faster using Maven.

EDIT: I would like to build and launch in Eclipse with the same dependency management. Using tycho and maven without target definition.

Upvotes: 0

Views: 406

Answers (1)

Sambit
Sambit

Reputation: 8021

I know that you want to get all the dependencies directly from maven repository as a set of jar files or like BOM(Bill of Materials) like spring boot. This can be done but it needs effort. There is another way where you can create your own p2 repository for specific eclipse version. Nexus and Artifactory also supports p2 repostory. First of all setup Nexus or Artifactory in the organization, keep other useful libraries and create p2 repository.The download will be faster and it will be specific to the organisation. For better understanding, the pom.xml will have something like this.

<repositories>
    <repository>
        <id>custome-rcp-eclipse</id>
        <layout>p2</layout>
        <url>http://nexus.organisation/path/someName</url>
    </repository>
</repositories>

Apart from this, I provide some useful links so that you can go through it. https://www.vogella.com/tutorials/Nexus/article.html https://www.jfrog.com/confluence/display/RTF/P2+Repositories https://www.eclipse.org/forums/index.php/t/1095653/

Upvotes: 1

Related Questions