我想镜像最新的Orbit更新站点的一些功能。我使用下面的配置。 (这个配置是从有效的pom中获取的,以确保这确实是我使用的配置。)
<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>
我构建maven pom,镜像存储库似乎没问题:
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
然而,当我将它加载到Eclipse中的目标文件规范中时,它表示没有什么可供选择:
如果删除<ius>
标记(从而禁用过滤),Eclipse仍会将其显示为空。所以完全镜像也行不通。
我做错了什么?
答案 0 :(得分:2)
您的存储库仅包含插件,这就是您在“安装”对话框中没有任何内容的原因。生成的存储库本身是正确的,可以在构建中用于解决依赖关系。
要让所有插件在安装对话框中可见,请考虑镜像org.eclipse.orbit.category.all类别IU。
另一个需要考虑的选择是使用打包构建p2存储库(这只是猜测,我还没有测试过):
<packaging>eclipse-repository</packaging>
和category.xml文件:
<?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>