pms1 / tppt

Target platform provisioning tools for P2 repository
Eclipse Public License 2.0
0 stars 0 forks source link

Target platform provisioning tools for p2 repositories

Maven Central Build Status Coverage Status

An Apache Maven plugin for creating p2 repositories along with features directly from Maven artifacts. This provides easy use of those artifacts during development of Eclipse RCP applications within the Eclipse IDE.

This project was created when I wanted to use Jersey inside an Eclipse RCP application and found it incredibly inconvenient to transform it's Maven artifacts into a p2 repository directly usable from Eclipse with the various existing tools.

Features

Usage

To create a p2 repository from a Maven artifact that is already an OSGi bundle is as simple as:

    <groupId>com.github.pms1.tppt</groupId>
    <artifactId>mavenrepo-bundle-dependency</artifactId>
    <version>0.0.0-SNAPSHOT</version>
    <packaging>tppt-repository</packaging>

    <dependencies>
        <dependency>
            <groupId>net.sf.jopt-simple</groupId>
            <artifactId>jopt-simple</artifactId>
            <version>5.0.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.github.pms1.tppt</groupId>
                <artifactId>tppt-maven-plugin</artifactId>
                <version>0.1.0</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>

This will create the following p2 repository:

artifacts.jar
content.jar
features/
features/com.github.pms1.tppt.mavenrepo-bundle-dependency_0.0.0.100.jar
p2.index
plugins/
plugins/net.sf.jopt-simple.jopt-simple.source_5.0.1.jar
plugins/net.sf.jopt-simple.jopt-simple_5.0.1.jar

Deploying

The tppt:deploy goal can be used to deploy the create p2 repository to an external resource. The following resources are supported:

The target must be specified in the form <serverId>::<uri> either as deploymentTarget in the configuration section of the pom.xml or as a command line property tppt.deploymentTarget. For file URIs the server id is ignored, for http or https it is used to lookup authentication credentials in the maven settings.

For HTTP(S) the following restrictions apply:

At the root of the deployment target a p2 composite repository is created that contains a list of all repositories deployed by tppt. This is used to (significantly for HTTP) speed up finding baseline repositories.