2013-06-17 2 views
2

Tycho를 사용하여 분류 된 p2 저장소를 생성하려고합니다. Tycho : p2 메타 데이터 분류

  • 트리거 org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher
  • 트리거 org.eclipse.equinox.p2.publisher.CategoryPublisher을

    1. 다운로드 번들
    2. : ( Eclipse documentation 비교) 만들기 기본적으로 세 단계가 있습니다

    이 파일은 maven pom 파일에 구성되어 있습니다. 여기

    Status ERROR: this code=0 publishing result null children=[Status ERROR: org.eclipse.equinox.p2.updatesite code=0 Error 
    generating category xml action. org.eclipse.equinox.p2.core.ProvisionException: Error reading update site file:/<path>/category.xml.] 
    

    내 pom.file

    <?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/maven-v4_0_0.xsd"> 
    
        <modelVersion>4.0.0</modelVersion> 
    
        <groupId>demo</groupId> 
        <artifactId>simple-p2-repository</artifactId> 
        <version>0.1.0-SNAPSHOT</version> 
        <name>Simple p2 repository build</name> 
        <packaging>pom</packaging> 
    
        <properties> 
        <tycho-version>0.18.0</tycho-version> 
        </properties> 
    
        <build> 
        <plugins> 
         <!-- Step 1 --> 
         <plugin> 
         <artifactId>maven-dependency-plugin</artifactId> 
         <executions> 
          <execution> 
          <id>copy-bundles-for-publishing</id> 
          <phase>process-resources</phase> 
          <goals> 
           <goal>copy</goal> 
          </goals> 
          <configuration> 
           <artifactItems> 
           <artifactItem> 
            <groupId>org.apache.cxf</groupId> 
            <artifactId>cxf-bundle</artifactId> 
            <version>2.7.5</version> 
           </artifactItem> 
           </artifactItems> 
           <outputDirectory>${project.basedir}/target/source/plugins</outputDirectory> 
          </configuration> 
          </execution> 
         </executions> 
         </plugin> 
         <!-- Step 2 --> 
         <plugin> 
         <groupId>org.eclipse.tycho.extras</groupId> 
         <artifactId>tycho-p2-extras-plugin</artifactId> 
         <version>${tycho-version}</version> 
         <executions> 
          <execution> 
          <phase>prepare-package</phase> 
          <goals> 
           <goal>publish-features-and-bundles</goal> 
          </goals> 
          </execution> 
         </executions> 
         <configuration> 
          <compress>true</compress> 
          <append>true</append> 
          <publishArtifacts>true</publishArtifacts> 
         </configuration> 
         </plugin> 
         <!-- Step3 --> 
         <plugin> 
         <groupId>org.eclipse.tycho</groupId> 
         <artifactId>tycho-p2-plugin</artifactId> 
         <version>${tycho-version}</version> 
         <executions> 
          <execution> 
          <phase>package</phase> 
          <goals> 
           <goal>category-p2-metadata</goal> 
          </goals> 
          </execution> 
         </executions> 
         <configuration> 
          <target>${basedir}/target/repository</target> 
          <categoryDefinition>${basedir}/category.xml</categoryDefinition> 
         </configuration> 
         </plugin> 
        </plugins> 
        </build> 
    </project> 
    

    나의 category.xml

    <?xml version="1.0" encoding="UTF-8"?> 
        <site> 
        <category-def name="all" label="Maven osgi-bundles"/> 
        <iu> 
         <category name="all"/> 
         <query> 
         <expression type="match">providedCapabilities.exists(p | p.namespace == 'osgi.bundle')</expression> 
        </query> 
        </iu> 
    </site> 
    

    제가 직접 실행하는 경우이다 : 1 단계와 2 단계는 3 단계가 실패 잘 반면 하 동일한 오류가 발생합니다. 나는 무엇을 놓치고 있습니까?

  • 답변

    0

    이론적으로 저수준 p2 동작을 Tycho를 통해 호출 할 수 있지만 해결하려는 문제에 대해서는이 방법을 사용하지 않는 것이 좋습니다.

    인공물은 이미 Maven 저장소에서 사용할 수 있으므로 pomDependencies=consider을 통해 Tycho 빌드의 target platform에 쉽게 추가 할 수 있습니다. 그런 다음 예를 들어 Tycho의 패키징 유형 eclipse-repository을 사용하여 이슈가있는 p2 저장소를 빌드 할 수 있습니다.

    다음과 같은 POM 구성을해야합니다 ...

    ... 
        <packaging>eclipse-repository</packaging> 
    
        <dependencies> 
        <dependency> 
         <groupId>org.apache.cxf</groupId> 
         <artifactId>cxf-bundle</artifactId> 
         <version>2.7.5</version> 
        </dependency> 
        </dependencies> 
    
        <build> 
        <plugins> 
         <plugin> 
         <groupId>org.eclipse.tycho</groupId> 
         <artifactId>target-platform-configuration</artifactId> 
         <version>${tycho-version}</version> 
         <configuration> 
          <pomDependencies>consider</pomDependencies> 
         </configuration> 
         </plugin> 
        </plugins> 
        </build> 
    

    ... 그리고 명시 적으로 번들 포함 할 나열하는 category.xml :

    <?xml version="1.0" encoding="UTF-8"?> 
    <site> 
        <bundle id="org.apache.cxf.bundle" version="0.0.0"> 
         <category name="all"/> 
        </bundle> 
        <category-def name="all" label="Maven osgi-bundles"/> 
    </site> 
    
    +0

    은''를 구문은 현재 Tycho에서 지원되지 않으며 아무도 [요청] (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Tycho)하지 않습니다. 어쩌면이 향상을 제안하고 싶습니까? – oberlies

    +0

    흠, "누락 된 요구 사항 : org.apache.cxf.bundle 2.7.5가 'com.ibm.wsdl.util.xml package 0.0.0'을 필요로하지만 찾을 수 없습니다."와 함께 실패합니다. @Achim :이 패키지가 런타임에 제공되어야하는 단서가 있습니까? – oberlies

    +0

    패키지는 [org.apache.servicemix.bundles.wsdl4j] (http://search.maven.org/#artifactdetails%7Corg.apache.servicemix.bundles%7Corg.apache.servicemix.bundles.wsdl4j%7C1)에서 제공됩니다. 6.3_1 % 7Cbundle). 힌트를 보내 주셔서 감사 드리며, 저에게 효과가 있으면보고 해 드리겠습니다. – Achim