Я разрабатываю плагин Eclipse и хотел бы использовать пакет OSGI от Jersey, размещенный на SpringSource, но как только пакет снесен, он не потребляется. Мой вопрос заключается в том, как я объявляю в своем POM или MANIFEST, что я хочу, чтобы пакет Jersey был потреблен в качестве зависимости?Проект плагина Eclipse, не потребляющий зависимостей связок OSGI
Мой проект состоит из простого сайта обновления, функции, которая содержит плагин, и самого плагина, созданного в соответствии с книгой: «Разработка плагина Eclipse 4 по примеру для начинающих». Я использую Tycho в качестве своего инструмента построения с родительским POM, который содержит информацию о целевой платформе, а другие - как модули.
Мой родитель POM ниже:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.inin.testing.eclipse</groupId>
<artifactId>com.inin.testing.eclipse.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho-version>0.18.1</tycho-version>
<eclipse>http://download.eclipse.org/releases/kepler</eclipse>
</properties>
<modules>
<module>com.inin.testing.eclipse.update</module>
<module>com.inin.testing.eclipse.feature.testcase</module>
<module>com.inin.testing.eclipse.plugin.tcdb</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>kepler</id>
<layout>p2</layout>
<url>${eclipse}</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<version>3.3.0-v_771</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>com.springsource.com.sun.jersey</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>
Плагин POM, как показано ниже:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.inin.testing.eclipse</groupId>
<artifactId>com.inin.testing.eclipse.update</artifactId>
<version>1.0.1-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<parent>
<groupId>com.inin.testing.eclipse</groupId>
<artifactId>com.inin.testing.eclipse.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
</project>
Я также добавил манифесте запись в проекте плагина, как указано на SpringSource:
Import-Bundle: com.springsource.com.sun.jersey;version="[1.0.0,1.0.0]"
Когда я строю с tycho, ошибок нет, но я не могу использовать ни один из классов, которые должны были быть импортированный с пучком Джерси.
Я попытался переместить зависимость Джерси от родителя к ребенку POM с тем же результатом. Возможно, решение настолько очевидно, что я не вижу его, или я нахожусь на совершенно неправильном пути. Любая помощь будет большой. Благодаря!