2009-08-10 69 views
9

我需要将eclipse插件安装到未连接到Internet的计算机上,并且找不到用于本地安装的dist。从更新站点下载eclipse插件的工具

是否有工具从更新站点下载插件并创建本地安装存档(或本地更新站点)?谣言说你可以用eclipse做到这一点,但我无法找到任何有关如何做到这一点的信息。

+0

并不清楚行家-2连接 在这儿。是否有一些你遗漏的背景信息,或者是否应该标记为“eclipse”? – 2009-08-10 21:33:09

+0

搞砸了标签,对不起。 – mafro 2009-08-11 07:54:10

+0

看来@PeterŠtibraný的答案不起作用,至少在某些情况下和Eclipse开普勒。你可以检查一下这是否仍然适用于你? – einpoklum 2014-01-09 15:46:13

回答

12

您可以使用P2 mirror tool(或P2 mirror in Galileo documentation)来镜像远程元数据和工件存储库。

下面是示例命令镜像伽利略工件本地存储库:(首先命令镜元数据,第二反射镜的工件命令应该在窗口中的一个线)

eclipse\eclipsec.exe -nosplash -verbose 
-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication 
-source http://download.eclipse.org/releases/galileo 
-destination file:d:/temp/galileo/ 

eclipse\eclipsec.exe -nosplash -verbose 
-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication 
-source http://download.eclipse.org/releases/galileo 
-destination file:d:/temp/galileo/ 

在运行这些命令之后,您可以使用file:d:/temp/galileo作为本地镜像。

或者,您可以使用P2 Mirror Ant Task,它允许您指定镜像的可安装单元(插件或功能)。注:指定功能时,不要忘记使用.feature.group后缀)

+0

正是我正在寻找的工具 - 谢谢! – mafro 2009-08-11 08:19:58

+0

说实话,我仍然不确定它是如何工作的:是否只镜像工件,让P2 Publisher生成元数据,还是镜像工件和元数据。当你成功时,请分享你的发现。谢谢。 – 2009-08-11 08:21:41

+1

更新回答:当我运行这两个命令(镜像元数据,镜像库)时,我得到了正确的更新站点供本地使用。我测试了http://download.eclipse.org/tools/mylyn/update/weekly/e3.4 – 2009-08-11 10:09:48

2

现在有也是P2网站使用第谷插件,Maven的镜像支持:http://wiki.eclipse.org/Tycho/Additional_Tools

其中一个好处是,你可以非常精确地指定要镜像,为此OS/WS /拱,...什么安装团结

例如,以反映Eclipse的靛蓝您可以使用下面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> 

    <groupId>mirroring</groupId> 
    <artifactId>indigo-mirror</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <packaging>pom</packaging> 

    <properties> 
     <tycho.version>0.16.0</tycho.version> 
    </properties> 

    <build> 
     <pluginManagement> 
      <plugins> 
       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-dependency-plugin</artifactId> 
        <version>2.5</version> 
       </plugin> 
       <plugin> 
        <groupId>org.eclipse.tycho</groupId> 
        <artifactId>tycho-p2-repository-plugin</artifactId> 
        <version>${tycho.version}</version> 
       </plugin> 
      </plugins> 
     </pluginManagement> 
     <plugins> 
      <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>mirror</goal> 
         </goals> 
        </execution> 
       </executions> 
       <configuration> 
        <source> 
         <!-- source repositories to mirror from --> 
         <repository> 
          <url>http://ftp.sh.cvut.cz/MIRRORS/eclipse/releases/indigo/</url> 
          <layout>p2</layout> 
          <!-- supported layouts are "p2-metadata", "p2-artifacts", and "p2" (for joint repositories; default) --> 
         </repository> 
        </source>  

        <!-- The destination directory to mirror to. --> 
        <destination>${project.build.directory}/repository</destination> 
        <!-- Whether only strict dependencies should be followed. --> 
        <!-- "strict" means perfect version match --> 
        <followStrictOnly>false</followStrictOnly> 
        <!-- Whether or not to follow optional requirements. --> 
        <includeOptional>true</includeOptional> 
        <!-- Whether or not to follow non-greedy requirements. --> 
        <includeNonGreedy>true</includeNonGreedy> 
              <!-- include the latest version of each IU --> 
        <latestVersionOnly>false</latestVersionOnly> 
        <!-- don't mirror artifacts, only metadata --> 
        <mirrorMetadataOnly>false</mirrorMetadataOnly> 
        <!-- whether to compress the content.xml/artifacts.xml --> 
        <compress>true</compress> 
        <!-- whether to append to the target repository content --> 
        <append>true</append> 
        <!-- whether to mirror pack200 artifacts also. Available since tycho-extras 0.17.0 --> 
        <verbose>true</verbose> 
        <includePacked>true</includePacked> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
</project>