Pergunta

Eu preciso instalar um plugin do eclipse para uma máquina não está conectado à Internet e não consigo encontrar um dist para uso por um local de instalação.

Existe uma ferramenta para baixar um plug-in a partir de um site de atualização e criar um arquivo de instalação local (ou um site de atualização local)? Rumores diz que você pode fazer isso com o eclipse, mas não consigo encontrar qualquer informação sobre como fazê-lo.

Foi útil?

Solução

Você pode usar P2 ferramenta de espelho (ou espelho P2 em Galileo documentação ) para espelhar metadados remoto e artefatos repositório.

Aqui é exemplo de comando para espelhar Galileo artefatos repositório localmente:

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/

(Primeira espelhos comando metadados, segundo espelhos artefatos. Command deve estar em uma linha no Windows)

Depois de executar esses comandos, você pode usar file:d:/temp/galileo como um espelho local.

Como alternativa, você pode usar P2 espelho Ant Task , que permite especificar unidades instaláveis ??(plugins ou recursos) para espelho. Nota: quando especificar recurso, não se esqueça de usar o sufixo .feature.group)

Outras dicas

Agora, há também um suporte para sites p2 espelham no maven usando Tycho plugins: http: // wiki. eclipse.org/Tycho/Additional_Tools

Uma das vantagens é que você pode muito precisa especificar o que une instalável você quiser espelho, para que os / ws / arco, ...

Por exemplo, para espelho Eclipse Indigo você pode usar seguinte 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>

Você pode achar Construindo um pacote Eclipse personalizado útil, embora seja provavelmente um pouco mais pesado que o que você precisa.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top