Skip to content

Maven plugin to generate Eclipse PDE target definitions using POM-first dependencies. Supplements functionality of Eclipse Tycho to use OSGI bundles from Maven repositories in Eclipse Plug-in Development Environment.

License

Notifications You must be signed in to change notification settings

andriusvelykis/pde-target-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Maven plugin adds POM-first dependencies to Eclipse PDE target platform. It is intended to help with Eclipse plugin development using Eclipse Tycho and PDE, when Maven OSGI dependencies are used.

Eclipse Tycho normally uses p2 repositories to resolve build dependencies. However, it also allows using OSGI bundles from Maven repository (POM-first dependencies) with configuration option <pomDependencies>consider</pomDependencies> (see Tycho POM-first dependencies). Unfortunately, the POM-first dependencies cannot be easily included in Target Platform Definition. This means that when the Tycho target platform is used in Eclipse PDE, it lacks the POM-first dependencies, leading to different target platforms between Tycho and within Eclipse IDE.

The pde-target-maven-plugin aims to help with this disparity: it can augment the base Target Definition used by Tycho with POM-first dependencies resolved against the local Maven repository. The generated target definition file will contain original locations, but will also add Directory locations to each POM dependency.

Goals overview

The PDE target definition plugin only has one goal:

  • pde-target:add-pom-dependencies adds POM-first dependencies of the project to the indicated base target definition file and writes a new target definition.

Usage

Refer to goal description for the list of all configuration options for PDE target definition plugin. Note that the plugin reuses Maven Dependency Plugin so a lot of configuration options are shared with dependency goals.

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>lt.velykis.maven</groupId>
        <artifactId>pde-target-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <id>pde-target</id>
            <goals>
              <goal>add-pom-dependencies</goal>
            </goals>
            <configuration>
              <baseDefinition>${project.basedir}/my-target.target</baseDefinition>
              <outputFile>${project.build.directory}/my-target-pde.target</outputFile>
            </configuration>
          </execution>
        </executions>
        ...
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

The use of generated target platform is quite straightforward with Eclipse Maven integration.

  1. First, import the Maven projects - this will resolve all POM dependencies into the local Maven repository.
  2. The add-pom-dependencies goal supports m2e out of the box, so the new target definition file will be generated automatically with resolved locations of POM-first dependencies.
  3. Finally, select the generated target definition file and set as Target Platform.

Bug tracker

Have a bug or a feature request? Please create an issue here on GitHub that conforms with necolas's guidelines.

http://github.com/andriusvelykis/pde-target-maven-plugin/issues

Contributing

Fork the repository and submit pull requests.

Author

Andrius Velykis

Copyright and license

Copyright 2012-2013 Andrius Velykis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Maven plugin to generate Eclipse PDE target definitions using POM-first dependencies. Supplements functionality of Eclipse Tycho to use OSGI bundles from Maven repositories in Eclipse Plug-in Development Environment.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages