我需要在未连接到 Internet 的计算机上安装 eclipse 插件,但找不到用于本地安装的 dist。

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

有帮助吗?

解决方案

您可以使用 P2镜像工具 (或者 Galileo 文档中的 P2 镜像)来镜像远程元数据和工件存储库。

以下是在本地镜像 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 镜像蚂蚁任务, ,它允许您指定要镜像的可安装单元(插件或功能)。笔记:当指定功能时,不要忘记使用 .feature.group 后缀)

其他提示

现在也有对P2网站使用第谷插件,Maven的镜像支持:的http://维基。 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>

您可能会发现构建定制Eclipse包有帮助,但它可能更多的重量级什么你所需要的。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top