Partly mirrored p2 repository does not contain installable units - "There are no items available" in Eclipse

StackOverflow https://stackoverflow.com/questions/18916317

  •  29-06-2022
  •  | 
  •  

質問

I want to mirror some features from the latest Orbit update site. I use the configuraiton below. (This configuration is taken it from the effective pom, to make sure that this is really the configuration I used.)

<plugin>
    <groupId>org.eclipse.tycho.extras</groupId>
    <artifactId>tycho-p2-extras-plugin</artifactId>
    <version>0.18.0</version>
    <executions>
        <execution>
            <id>mirror-orbit-R20130827064939</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>mirror</goal>
            </goals>
            <configuration>
                <source>
                    <repository>
                        <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20130827064939/repository</url>
                        <layout>p2</layout>
                    </repository>
                </source>
                <ius>
                    <iu><id>com.google.guava</id></iu>
                    <iu><id>com.google.guava.source</id></iu>
                    <iu><id>org.mockito</id></iu>
                    <iu><id>org.mockito.source</id></iu>
                    <iu><id>org.junit</id></iu>
                    <iu><id>org.junit.source</id></iu>
                    <iu><id>org.objenesis</id></iu>
                    <iu><id>org.objenesis.source</id></iu>
                    <iu><id>org.hamcrest</id></iu>
                    <iu><id>org.hamcrest.core</id></iu>
                    <iu><id>org.hamcrest.core.source</id></iu>
                    <iu><id>org.hamcrest.text</id></iu>
                    <iu><id>org.hamcrest.text.source</id></iu>
                    <iu><id>org.hamcrest.library</id></iu>
                    <iu><id>org.hamcrest.library.source</id></iu>
                    <iu><id>org.hamcrest.integration</id></iu>
                    <iu><id>org.hamcrest.integration.source</id></iu>
                    <iu><id>org.hamcrest.generator</id></iu>
                    <iu><id>org.hamcrest.generator.source</id></iu>
                    <iu><id>org.slf4j.log4j</id></iu>
                    <iu><id>org.slf4j.log4j.source</id></iu>
                    <iu><id>org.slf4j.api</id></iu>
                    <iu><id>org.slf4j.api.source</id></iu>
                    <iu><id>javax.servlet</id></iu>
                    <iu><id>javax.servlet.source</id>
                </ius>
                <destination>/somefolder/mirror/orbit/R20130827064939</destination>
            </configuration>
        </execution>
    </executions>
</plugin>

I build the maven pom, and the mirrored repository seems to be ok:

R20130827064939
-plugins
--com.google.guava_12.0.0.v201212092141.jar
--com.google.guava_12.0.0.v201212092141.jar.pack.gz
--com.google.guava.source_12.0.0.v201212092141.jar
--com.google.guava.source_12.0.0.v201212092141.jar.pack.gz
--com.thoughtworks.qdox_1.6.3.v20081201-1400.jar
--com.thoughtworks.qdox_1.6.3.v20081201-1400.jar.pack.gz
--javax.annotation_1.0.0.v201209060030.jar
--javax.annotation_1.0.0.v201209060030.jar.pack.gz
--javax.annotation_1.1.0.v201209060031.jar
--javax.annotation_1.1.0.v201209060031.jar.pack.gz
--javax.servlet_3.0.0.v201112011016.jar
--javax.servlet_3.0.0.v201112011016.jar.pack.gz
--javax.servlet.source_3.0.0.v201112011016.jar
--javax.servlet.source_3.0.0.v201112011016.jar.pack.gz
--javax.xml_1.3.4.v201005080400.jar
--javax.xml_1.3.4.v201005080400.jar.pack.gz
--org.apache.ant_1.8.2.v201303080311.jar
--org.apache.ant_1.8.2.v201303080311.jar.pack.gz
--org.apache.ant_1.8.3.v201303080312.jar
--org.apache.ant_1.8.3.v201303080312.jar.pack.gz
--org.apache.ant_1.8.4.v201303080030.jar
--org.apache.ant_1.8.4.v201303080030.jar.pack.gz
--org.apache.batik.css_1.7.0.v201011041433.jar
--org.apache.batik.css_1.7.0.v201011041433.jar.pack.gz
--org.apache.batik.dom_1.7.0.v201011041433.jar
--org.apache.batik.dom_1.7.0.v201011041433.jar.pack.gz
--org.apache.batik.util_1.7.0.v201011041433.jar
--org.apache.batik.util_1.7.0.v201011041433.jar.pack.gz
--org.apache.batik.util.gui_1.7.0.v200903091627.jar
--org.apache.batik.util.gui_1.7.0.v200903091627.jar.pack.gz
--org.apache.batik.xml_1.7.0.v201011041433.jar
--org.apache.batik.xml_1.7.0.v201011041433.jar.pack.gz
--org.apache.xerces_2.8.0.v200803070308.jar
--org.apache.xerces_2.8.0.v200803070308.jar.pack.gz
--org.apache.xml.resolver_1.1.0.v200806030311.jar
--org.apache.xml.resolver_1.1.0.v200806030311.jar.pack.gz
--org.apache.xml.resolver_1.2.0.v201005080400.jar
--org.apache.xml.resolver_1.2.0.v201005080400.jar.pack.gz
--org.easymock_2.4.0.v20090202-0900.jar
--org.easymock_2.4.0.v20090202-0900.jar.pack.gz
--org.hamcrest_1.1.0.v20090501071000.jar
--org.hamcrest_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.core_1.1.0.v20090501071000.jar
--org.hamcrest.core_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.core_1.3.0.v201303031735.jar
--org.hamcrest.core_1.3.0.v201303031735.jar.pack.gz
--org.hamcrest.core.source_1.3.0.v201303031735.jar
--org.hamcrest.core.source_1.3.0.v201303031735.jar.pack.gz
--org.hamcrest.generator_1.1.0.v20090501071000.jar
--org.hamcrest.generator_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.generator.source_1.1.0.v20090501071000.jar
--org.hamcrest.generator.source_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.integration_1.1.0.v201303031500.jar
--org.hamcrest.integration_1.1.0.v201303031500.jar.pack.gz
--org.hamcrest.integration.source_1.1.0.v201303031500.jar
--org.hamcrest.integration.source_1.1.0.v201303031500.jar.pack.gz
--org.hamcrest.library_1.1.0.v20090501071000.jar
--org.hamcrest.library_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.library.source_1.1.0.v20090501071000.jar
--org.hamcrest.library.source_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.text_1.1.0.v20090501071000.jar
--org.hamcrest.text_1.1.0.v20090501071000.jar.pack.gz
--org.hamcrest.text.source_1.1.0.v20090501071000.jar
--org.hamcrest.text.source_1.1.0.v20090501071000.jar.pack.gz
--org.junit_3.8.2.v3_8_2_v20130308-0410.jar
--org.junit_3.8.2.v3_8_2_v20130308-0410.jar.pack.gz
--org.junit_4.10.0.v4_10_0_v20130308-0414.jar
--org.junit_4.10.0.v4_10_0_v20130308-0414.jar.pack.gz
--org.junit_4.11.0.v201303080030.jar
--org.junit_4.11.0.v201303080030.jar.pack.gz
--org.junit_4.7.0.v4_7_0_v20130308-0411.jar
--org.junit_4.7.0.v4_7_0_v20130308-0411.jar.pack.gz
--org.junit_4.8.1.v4_8_1_v20130308-0412.jar
--org.junit_4.8.1.v4_8_1_v20130308-0412.jar.pack.gz
--org.junit_4.8.2.v4_8_2_v20130308-0413.jar
--org.junit_4.8.2.v4_8_2_v20130308-0413.jar.pack.gz
--org.junit.source_4.11.0.v201303080030.jar
--org.junit.source_4.11.0.v201303080030.jar.pack.gz
--org.mockito_1.8.4.v201303031500.jar
--org.mockito_1.8.4.v201303031500.jar.pack.gz
--org.mockito.source_1.8.4.v201303031500.jar
--org.mockito.source_1.8.4.v201303031500.jar.pack.gz
--org.objenesis_1.0.0.v201105211943.jar
--org.objenesis_1.0.0.v201105211943.jar.pack.gz
--org.objenesis.source_1.0.0.v201105211943.jar
--org.objenesis.source_1.0.0.v201105211943.jar.pack.gz
--org.slf4j.api_1.7.2.v20121108-1250.jar
--org.slf4j.api_1.7.2.v20121108-1250.jar.pack.gz
--org.slf4j.api.source_1.7.2.v20121108-1250.jar
--org.slf4j.api.source_1.7.2.v20121108-1250.jar.pack.gz
--org.slf4j.log4j_1.7.2.v20130115-1340.jar
--org.slf4j.log4j_1.7.2.v20130115-1340.jar.pack.gz
--org.slf4j.log4j.source_1.7.2.v20130115-1340.jar
--org.slf4j.log4j.source_1.7.2.v20130115-1340.jar.pack.gz
--org.w3c.css.sac_1.3.0.v200805290154.jar
--org.w3c.css.sac_1.3.0.v200805290154.jar.pack.gz
--org.w3c.css.sac_1.3.1.v200903091627.jar
--org.w3c.css.sac_1.3.1.v200903091627.jar.pack.gz
--org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar
--org.w3c.dom.events_3.0.0.draft20060413_v201105210656.jar.pack.gz
--org.w3c.dom.smil_1.0.0.v200806040011.jar
--org.w3c.dom.smil_1.0.0.v200806040011.jar.pack.gz
--org.w3c.dom.smil_1.0.1.v200903091627.jar
--org.w3c.dom.smil_1.0.1.v200903091627.jar.pack.gz
--org.w3c.dom.svg_1.1.0.v201011041433.jar.pack.gz
--org.w3c.dom.svg_1.1.0.v201011041433.jar
-artifacts.jar
-contents.jar

However when I load it into a target file specification in Eclipse, it says that there is nothing to choose from: enter image description here

If I remove the <ius> tag (and hence disable the filtering), Eclipse still shows it as empty. So full mirroring also does not work.

What do I do wrong?

役に立ちましたか?

解決

Your repository contains only plug-ins that's why you have nothing in Install dialog. The resulting repository itself is correct and can be used in builds to resolve dependencies.

To have all plugins visible in Install dialog you cold consider mirroring org.eclipse.orbit.category.all category IU.

Another option to consider is building p2 repository using packaging (this is just a guess and I haven't tested it):

<packaging>eclipse-repository</packaging>

and category.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<site>
   <bundle id="com.google.guava" version="0.0.0">
       <category name="all"/>
   </bundle>
   <bundle id="com.google.guava.source" version="0.0.0">
       <category name="all"/>
   </bundle>

   <category-def name="all" label="My Orbit bundles"/>
</site>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top