Pregunta

Es necesario instalar un plugin de Eclipse para una máquina no está conectado a Internet y no puedo encontrar un dist utilizar para una instalación local.

¿Hay una herramienta para descargar un plugin desde un sitio de actualización y crear un archivo de instalación local (o un sitio de actualización local)? Los rumores dice que usted puede hacer esto con eclipse, pero no puedo encontrar ninguna información sobre cómo hacerlo.

¿Fue útil?

Solución

Puede utilizar P2 herramienta de espejo (o espejo P2 en Galileo documentación ) para reflejar los metadatos a distancia y artefactos repositorio.

Aquí está comandos de ejemplo para reflejar artefactos Galileo repositorio local:

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/

(Primera espejos de mando metadatos, segundo espejos artefactos. Comando debe estar en una línea de ventanas)

Después de ejecutar estos comandos, puede utilizar file:d:/temp/galileo como una réplica local.

Como alternativa, puede utilizar P2 Espejo Ant tareas , que le permite especificar las unidades instalables (plugins o características) para reflejar. Nota: cuando se especifica función, no se olvide de utilizar el sufijo .feature.group)

Otros consejos

Ahora hay también un soporte para sitios p2 reflejan en el experto en el uso de plugins tycho: http: // wiki. eclipse.org/Tycho/Additional_Tools

Una de las ventajas es que se puede especificar de manera muy precisa lo que une instalable que desea reflejar, por lo que OS / WS / arco, ...

Por ejemplo, para reflejar Eclipse Indigo puede utilizar después de 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>

Usted puede encontrar La construcción de una costumbre Eclipse paquete útil, aunque es probable que sea un poco más pesado que lo lo que necesita.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top