현재 RCP 프로젝트가 있는데 Tycho-packaging을 사용하여 제품을 내보내려고하지만 제 3 자 플러그인 및 기능을 어떻게 관리 할 수 있습니까?Tycho Maven : 제 3 자 번들 및 기능이있는 제품 내보내기
1
A
답변
0
하지만 문제가 무엇입니까? 타사 플러그인을 대상 플랫폼에 추가 한 경우 Tycho가 해당 플러그인을 내보냅니다. 작업 공간에 프로젝트가있는 경우 적절한 패키지 유형 인 "eclipse-plugin"
, "eclipse-feature"
등과 같은 프로젝트에 pom.xml을 추가하십시오. 이러한 프로젝트가 서버와 클라이언트간에 공유되고 다른 패키징 유형이 필요한 경우 상위 폴더를 구성하십시오. 클라이언트의 XML은 pom.osgi.xml는 티코위한 포장 유형을 포함하고 "평민"프로젝트 (예 : "항아리"에 대한) 서버 포장 유형 표준 pom.xml 파일이 포함이
<module>../commons/pom.osgi.xml</module>
처럼 뭔가 프로젝트.
UPD : pom.osgi.xml의 예 내용 : MANIFEST.MF
의<?xml version="1.0" encoding="UTF-8"?><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.company</groupId>
<version>5.4.0.v20140625-0169</version>
<packaging>eclipse-plugin</packaging>
<parent>
<groupId>com.company</groupId>
<artifactId>app.client</artifactId>
<version>5.4.0-SNAPSHOT</version>
<relativePath>../parent.project.path</relativePath>
</parent>
<artifactId>com.company.activity</artifactId>
</project>
내용 또한
Bundle-SymbolicName: com.company.activity
, 모두 pom.osgi.xml 및 MANIFEST.MF의 버전이 일치해야합니다 이것이 빌드 시스템이이 두 파일을 모두 업데이트하도록 구성된 이유입니다.
UPD 2 : 대상 플랫폼의 pom.xml :
<properties>
<product.dir>${project.basedir}/eclipse</product.dir>
<p2.dir>${project.basedir}/../repository/base</p2.dir>
</properties>
<dependencies>
<!-- Eclipse Helios -->
<!-- Includes JUnit -->
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>rcp-helios</artifactId>
<version>${eclipse.rcp.version}</version>
<type>zip</type>
<optional>true</optional>
</dependency>
<!-- Delta Pack for MultiPlatform Build -->
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>delta-pack</artifactId>
<version>${eclipse.rcp.version}</version>
<classifier>pack</classifier>
<type>zip</type>
<optional>true</optional>
</dependency>
<!-- babel.de Language Pack -->
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>BabelLanguagePack-de</artifactId>
<version>${eclipse.babel.version}</version>
<type>zip</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${product.dir}</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/../ajdt/eclipse</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>unpack-eclipseRcp</id>
<phase>validate</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.eclipse</includeGroupIds>
<includeArtifactIds>rcp-helios,delta-pack,BabelLanguagePack-de</includeArtifactIds>
<outputDirectory>${product.dir}/../</outputDirectory>
</configuration>
</execution>
<execution>
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<excludeArtifactIds>rcp-helios,delta-pack,BabelLanguagePack-de</excludeArtifactIds>
<outputDirectory>${product.dir}/plugins</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>runtime</includeScope>
<artifactItems>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${product.dir}/plugins</outputDirectory>
<artifactItems>
....
<!-- Jersey -->
<artifactItem>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${org.glassfish.jersey.core.version}</version>
<destFileName>org.glassfish.jersey.core.jersey-client_${org.glassfish.jersey.core.version}.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${org.glassfish.jersey.core.version}</version>
<destFileName>org.glassfish.jersey.core.jersey-client-source_${org.glassfish.jersey.core.version}.jar</destFileName>
</artifactItem>
<!-- SLF4j -->
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<destFileName>slf4j.api_${slf4j.version}.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${ch.qos.logback.version}</version>
<destFileName>ch.qos.logback.core_${ch.qos.logback.version}.jar</destFileName>
</artifactItem>
....
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<destFileName>jackson-mapper-asl_${jackson-mapper-asl.version}.jar</destFileName>
<version>${jackson-mapper-asl.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
<destFileName>org.hamcrest.all_${hamcrest.version}.jar</destFileName>
</dependency>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>0.13.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>publish-features-and-bundles</goal>
</goals>
</execution>
</executions>
<configuration>
<compress>false</compress>
<metadataRepositoryLocation>${p2.dir}</metadataRepositoryLocation>
<artifactRepositoryLocation>${p2.dir}</artifactRepositoryLocation>
<sourceLocation>${product.dir}</sourceLocation>
<publishArtifacts>true</publishArtifacts>
<append>true</append>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>eclipse</directory>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${p2.dir}</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
안녕하세요 알렉산더! 당신의 전진 응답을위한 많은 감사합니다. 나는 패키징 유형을 변경하고 상위 pom에 프로파일로 구성 할 수있는 가능성에 대해 생각해 왔으며 수출 제품을 사용하기 전에 활성화 할 수있었습니다. 문제는 타이코 필수 요소 중 하나는 인공물이 MANIFEST.MF에 포함 된 Bundle-SymbolicName과 같아야한다는 것입니다. 그리고 다른 이름으로 구성했습니다. 그래서 다른 옵션을 찾고 있습니다. 내 타겟 플랫폼에서 정의하려고 노력할 것이다. 고맙습니다! –
@ CristinaGalán, 업데이트 된 답변을 참조하십시오. –
Hello Alexander! 필요한 플러그인을 사용하여 디렉토리를 만들려고했지만 Tycho-Target 플랫폼이 디렉토리 유형을 지원하지 않는 것이 문제입니다. 종속성을 포함시키고 pyDependencies를 고려한 타이코 플랫폼을 구성하려했지만 여전히 작동하지 않습니다. 어떻게 관리 할 수 있을지 모든 생각? –