diff --git a/src/mirror/Dockerfile b/src/mirror/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7380ff4edf48b9d843d4f46e0b645625eff01afc --- /dev/null +++ b/src/mirror/Dockerfile @@ -0,0 +1,12 @@ +FROM library/maven:3.8.7-eclipse-temurin-17 +COPY pom-eclipse.xml /tmp +COPY pom-orbit.xml /tmp +RUN mvn -f /tmp/pom-eclipse.xml package +RUN mvn -f /tmp/pom-orbit.xml package +RUN rm /tmp/pom-eclipse.xml +RUN rm /tmp/pom-orbit.xml +RUN rm -rf /tmp/target +RUN rm -rf /root/.m2/repository + +ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"] +CMD ["mvn"] \ No newline at end of file diff --git a/src/mirror/create-docker.sh b/src/mirror/create-docker.sh new file mode 100644 index 0000000000000000000000000000000000000000..ec5f5504117e2c1461e6ae100d1aec434ea2e0e9 --- /dev/null +++ b/src/mirror/create-docker.sh @@ -0,0 +1,2 @@ +docker build -t gitlab.informatik.uni-bremen.de:5005/evoal/source/evoal-core/evoal/eclipse-mirror:2022-12 . +#docker push gitlab.informatik.uni-bremen.de:5005/evoal/source/evoal-core/evoal/eclipse-mirror:2022-12 \ No newline at end of file diff --git a/src/mirror/pom-eclipse.xml b/src/mirror/pom-eclipse.xml new file mode 100644 index 0000000000000000000000000000000000000000..fb7f9b16e9809756a03fb65d05950e498a62cc1f --- /dev/null +++ b/src/mirror/pom-eclipse.xml @@ -0,0 +1,90 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.evoal</groupId> + <artifactId>p2-mirror-orbit</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Mirror Parent</name> + + <properties> + <tycho.version>3.0.0</tycho.version> + <tycho-extras.version>3.0.0</tycho-extras.version> + + <eclipse.environment>JavaSE-17</eclipse.environment> + + <url.eclipse>https://download.eclipse.org/releases/2022-12/202212071000</url.eclipse> + <url.orbit>https://download.eclipse.org/tools/orbit/downloads/drops/R20221123021534/repository</url.orbit> + </properties> + + <build> + <plugins> + <!-- Activating Maven Tycho --> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-maven-plugin</artifactId> + <version>${tycho.version}</version> + <extensions>true</extensions> + </plugin> + + <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>${url.eclipse}</url> + <layout>p2</layout> + </repository> +<!-- + <repository> + <url>${url.orbit}</url> + <layout>p2</layout> + </repository> +--> + </source> + + <!-- The destination directory to mirror to. --> + <destination>${env.HOME}/.m2/p2-mirror/eclipse-mirror</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> + + <!-- Whether to filter the resulting set of IUs to only --> + <!-- 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> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/src/mirror/pom-orbit.xml b/src/mirror/pom-orbit.xml new file mode 100644 index 0000000000000000000000000000000000000000..5c5cb5e342677c900405f3be448675b25e4e8fcb --- /dev/null +++ b/src/mirror/pom-orbit.xml @@ -0,0 +1,84 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.evoal</groupId> + <artifactId>p2-mirror-orbit</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Mirror Parent</name> + + <properties> + <tycho.version>3.0.0</tycho.version> + <tycho-extras.version>3.0.0</tycho-extras.version> + + <eclipse.environment>JavaSE-17</eclipse.environment> + + <url.eclipse>https://download.eclipse.org/releases/2022-12/202212071000</url.eclipse> + <url.orbit>https://download.eclipse.org/tools/orbit/downloads/drops/R20221123021534/repository</url.orbit> + </properties> + + <build> + <plugins> + <!-- Activating Maven Tycho --> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-maven-plugin</artifactId> + <version>${tycho.version}</version> + <extensions>true</extensions> + </plugin> + + <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>${url.orbit}</url> + <layout>p2</layout> + </repository> + </source> + + <!-- The destination directory to mirror to. --> + <destination>${env.HOME}/.m2/p2-mirror/orbit-mirror</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> + + <!-- Whether to filter the resulting set of IUs to only --> + <!-- 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> + </configuration> + </plugin> + </plugins> + </build> +</project>