2017-12-14 3 views
0

RAP 또는 RCP 번들, 조각 및 기능을 빌드하는 데 maven 프로파일을 사용하는 단일 소스 RCP/RAP Eclipse 기능 프로젝트에 대한 빌드가 있습니다.RAP 및 RCP 맛 내기 기능을위한 단일 업데이트 사이트 빌드

정상적으로 작동합니다. 위 빌드의 부모 POM에 업데이트 사이트 프로젝트를 모듈로 포함하면 "eclipse-update-site"(또는 "eclipse-repository") 패키징을 사용하여 플랫폼 별 업데이트 사이트를 쉽게 빌드 할 수 있습니다.

그러나, 나는

  1. 빌드 RCP 대상 플랫폼에 대한 방법>
  2. 빌드 RAP의 대상 플랫폼 지역의 repo에 게시
  3. 실행 RCP에 대한 건설 지역의 repo에 게시>가있는 경우, 궁금 해서요 (1 단계의 대상 플랫폼)> 로컬 repo에 게시
  4. RAP (2 단계의 대상 플랫폼)에 대한 실행 빌드> 로컬 저장소에 게시
  5. 업데이트 사이트 전용 실행 빌드, RAP 및 RC 용 기능 포함 P (1 + 2에서 어셈블하는 것)

Tycho가 category 한정자로 참조 된 기능을 다른 한정자로 해결하려고했기 때문에 1에서 4까지는 성공적으로 실행할 수 있었지만 5는 실행할 수 없었습니다. .

사이트/p2 리포지토리를 올바르게 업데이트했다면 다양한 맛의 아티팩트/번들/기능을 제공 할 수 있어야합니다. 맞습니까?

어떻게 해결할 수 있습니까? 아니면 위의 빌드 단계를 모두 동일한 한정자로 연속적으로 실행하는 단일 타이코 빌드를 사용할 수 있습니까?


부록existing question는 같은 방향으로 가고 "에 ... 지역 메이븐 저장소 (기능) 티코 프로젝트 (들)를 설치"를 제안합니다. 사실 1과 2를 실행할 때 내가하고있는 일이 실제로 서로 같습니다. 둘 다 동일한 로컬 저장소를 지정합니다. 그러나 한정자가 다르므로 참조 된 유물을 거기에서 끌어 오지 못한다 (2 개의 별개의 원자로 구조). 같은 원자로에서 모든 것을 실행하는 것은 나에게는 매우 좋을지 모르지만, 다른 대상 플랫폼이 관련되어 있기 때문에 불가능하다고 생각합니다.

거기 해결책은 내가 필요한 것에 가깝지만 내 category.xml (또는 site.xml)과 POM의 추가 종속성이 함께 작동하는 방식을 이해하지 못한다고 생각합니다. category.xml을 모두 포기하고 eclipse-repository POM에 내 모든 종속성을 다시 지정해야합니까?


내 빌드는 대략 다음과 같습니다

foo.releng/pom.xml (부모 POM)이

<?xml version="1.0" encoding="UTF-8"?> 
<project 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" 
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

    <modelVersion>4.0.0</modelVersion> 
    <groupId>net.bar</groupId> 
    <artifactId>foo</artifactId> 
    <version>0.31.0-SNAPSHOT</version> 
    <packaging>pom</packaging> 

    <properties> 
     <tycho-version>1.0.0</tycho-version> 
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
     <jacoco-version>0.7.6.201602180812</jacoco-version> 
    </properties> 

    <modules> 
     <module>../foo.plugin1</module> 
     <module>../foo.plugin2</module> 
     <!-- feature module is built depending on target platform, see below --> 
    </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> 
        <!-- target and dependency-resolution are RAP/RCP dependent, see profiles below --> 
        <resolver>p2</resolver> 
        <environments> 
         <environment> 
          <os>win32</os> 
          <ws>win32</ws> 
          <arch>x86</arch> 
         </environment> 
         <environment> 
          <os>win32</os> 
          <ws>win32</ws> 
          <arch>x86_64</arch> 
         </environment> 
        </environments> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 

    <profiles> 
     <profile> 
      <id>target-rcp</id> 
      <activation> 
       <property> 
        <name>target.platform</name> 
        <value>rcp</value> 
       </property> 
      </activation> 
      <modules> 
       <module>../foo.fragment.rcp</module> 
       <module>../foo.feature.rcp</module> 
      </modules> 
      <build> 
       <plugins> 
        <plugin> 
         <groupId>org.eclipse.tycho</groupId> 
         <artifactId>target-platform-configuration</artifactId> 
         <version>${tycho-version}</version> 
         <configuration> 
          <target> 
           <artifact> 
            <groupId>net.bar</groupId> 
            <artifactId>net.bar.foo.target.rcp</artifactId> 
            <version>${project.version}</version> 
            <classifier>rcp</classifier> 
           </artifact> 
          </target> 
          <dependency-resolution> 
           <optionalDependencies>ignore</optionalDependencies> 
           <extraRequirements> 
            <requirement> 
             <type>eclipse-plugin</type> 
             <id>org.eclipse.ui</id> 
             <versionRange>0.0.0</versionRange> 
            </requirement> 

            ... more rcp-only dependencies 

           </extraRequirements> 
          </dependency-resolution> 
         </configuration> 
        </plugin> 
       </plugins> 
      </build> 
     </profile> 
     <profile> 
      <id>target-rap</id> 
      <activation> 
       <property> 
        <name>target.platform</name> 
        <value>rap</value> 
       </property> 
      </activation> 
      <modules> 
       <module>../foo.fragment.rap</module> 
       <module>../foo.feature.rap</module> 
      </modules> 
      <build> 
       <plugins> 
        <plugin> 
         <groupId>org.eclipse.tycho</groupId> 
         <artifactId>target-platform-configuration</artifactId> 
         <version>${tycho-version}</version> 
         <configuration> 

         ... same as for RCP above, but for RAP 

         </configuration> 
        </plugin> 
       </plugins> 
      </build> 
     </profile> 
    </profiles> 
</project> 

이는 updatesite/category.xml

<?xml version="1.0" encoding="UTF-8"?> 
<site> 
    <feature url="features/net.bar.foo.feature.rcp_0.31.0.qualifier.jar" id="net.bar.foo.feature.rcp" version="0.31.0.qualifier"> 
     <category name="net.bar.rcp"/> 
    </feature> 
    <feature url="features/net.bar.foo.feature.rap_0.31.0.qualifier.jar" id="net.bar.foo.feature.rap" version="0.31.0.qualifier"> 
     <category name="net.bar.rap"/> 
    </feature> 
    <category-def name="net.bar.rcp" label="RCP"> 
     <description> 
     RCP Platform Features 
     </description> 
    </category-def> 
    <category-def name="net.bar.rap" label="RAP"> 
     <description> 
     RAP Platform Features 
     </description> 
    </category-def> 
</site> 

그리고 updatesite/pom.xml입니다 :

<?xml version="1.0" encoding="UTF-8"?> 
<project 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" 
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <modelVersion>4.0.0</modelVersion> 

    <parent> 
     <version>0.31.0-SNAPSHOT</version> 
     <relativePath>../foo.releng/pom.xml</relativePath> 
     <artifactId>foo</artifactId> 
     <groupId>net.bar</groupId> 
    </parent> 

    <artifactId>net.bar.foo.updatesite</artifactId> 
    <packaging>eclipse-repository</packaging> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>tycho-packaging-plugin</artifactId> 
       <version>${tycho-version}</version> 
       <configuration> 
        <archiveSite>true</archiveSite> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 

</project> 
+0

당신이 UpdateSite 디의 치어의 내용을 게시 할 수 다음 빌드는 RAP와 RCP 기능 맛을 아무 문제없이 통해 실행 발행이 조정 후

? _eclipse-repository_ 목표는 site.xml을 고려하지 않습니다. – tkotisis

+0

@tkotisis 이에 따라 질문을 업데이트했습니다. 나는'eclipse-repository' 패키징과'category.xml'을 사용하고 있습니다. – cheppsn

답변

0

This question 매우 유사한 문제로 인해 해결책을 찾는데 도움이되었습니다.

tycho-packaging-pluginreproducible timestamp qualifier으로 구성하여 결론을 보았습니다.

내 모든 연속 빌드에 대해 상수 버전 한정자 (git commit ID를 기반으로 함)를 사용하면 최종 저장소 빌드가 참조 된 모든 기능 번들을 로컬 메이븐 저장소에서 올바르게 해결할 수 있습니다.

# build rcp target 

cd foo/net.bar.foo.target.rcp 
mvn clean install -Dmaven.repo.local=../../m2 

# build rap target 

cd ../net.bar.foo.target.rap 
mvn clean install -Dmaven.repo.local=../../m2 

# build features and plugins for rcp, then for rap 

cd ../net.bar.foo.releng 
mvn clean install -Dmaven.repo.local=../../m2 -Dtarget.platform=rcp 
mvn clean install -Dmaven.repo.local=../../m2 -Dtarget.platform=rap 

# build p2 repository 

cd ../net.bar.foo.updatesite 
mvn clean install -Dmaven.repo.local=../../m2 -Dtarget.platform=rap 

자보세요 :

Update site with RCP and RAP flavor of same feature

관련 문제