我需要在没有连接到Internet的计算机上安装eclipse插件,我找不到用于本地安装的dist。
是否有从更新站点下载插件并创建本地安装档案(或本地更新站点)的工具?谣言说你可以用eclipse做到这一点,但我找不到任何关于如何做的信息。
答案 0 :(得分:12)
您可以使用P2 mirror tool(或P2 mirror in Galileo documentation)镜像远程元数据和工件存储库。
以下是在本地镜像Galileo工件库的示例命令:
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/
(第一个命令镜像元数据,第二个镜像工件。命令应该在Windows中的一行上)
运行这些命令后,可以使用file:d:/temp/galileo
作为本地镜像。
或者,您可以使用P2 Mirror Ant Task,它允许您指定要镜像的可安装单元(插件或功能)。注意:指定功能时,不要忘记使用.feature.group
后缀)
答案 1 :(得分:2)
现在还支持使用tycho插件在maven中镜像的p2站点:http://wiki.eclipse.org/Tycho/Additional_Tools
其中一个优点是你可以非常精确地指定你要镜像的可安装单元,os / ws / arch,...
例如,要镜像Eclipse Indigo,您可以使用以下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>
答案 2 :(得分:0)
你可能会发现Building a custom Eclipse package很有帮助,虽然它可能比你需要的更重要一些。