Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Bettini2016-11-21 10:20:05 +0000
committerLorenzo Bettini2016-11-21 10:20:05 +0000
commit0f3c9b04a9e97f47eb7c71f5b6f1a39dd15dd399 (patch)
tree309b5d28eea5de4850480a3e7d71f3ef6dac64c9 /releng/org.eclipse.emf.parsley.repository
parentfb19510dcc0f8482e0495730de0c3ba5f506d8b2 (diff)
downloadorg.eclipse.emf-parsley-0f3c9b04a9e97f47eb7c71f5b6f1a39dd15dd399.tar.gz
org.eclipse.emf-parsley-0f3c9b04a9e97f47eb7c71f5b6f1a39dd15dd399.tar.xz
org.eclipse.emf-parsley-0f3c9b04a9e97f47eb7c71f5b6f1a39dd15dd399.zip
deal with p2.mirrorsURL for artifacts.xml.xz
Diffstat (limited to 'releng/org.eclipse.emf.parsley.repository')
-rw-r--r--releng/org.eclipse.emf.parsley.repository/pom.xml101
1 files changed, 93 insertions, 8 deletions
diff --git a/releng/org.eclipse.emf.parsley.repository/pom.xml b/releng/org.eclipse.emf.parsley.repository/pom.xml
index fa1f306ca..89852b896 100644
--- a/releng/org.eclipse.emf.parsley.repository/pom.xml
+++ b/releng/org.eclipse.emf.parsley.repository/pom.xml
@@ -14,7 +14,7 @@
<packaging>eclipse-repository</packaging>
<properties>
- <p2.mirrorsPrefix>/emf-parsley/updates</p2.mirrorsPrefix>
+ <p2.mirrorsPrefix>/emf-parsley/${parsley.updates.dir}</p2.mirrorsPrefix>
<p2.versionMajorMinor>1.1</p2.versionMajorMinor>
<p2.statsURL>http://download.eclipse.org/stats</p2.statsURL>
<p2.mirrorsURL>http://www.eclipse.org/downloads/download.php?format=xml&amp;file=${p2.mirrorsPrefix}/${p2.versionMajorMinor}/${qualifiedVersion}/</p2.mirrorsURL>
@@ -104,14 +104,31 @@
<version>${tycho-version}</version>
<executions>
<execution>
+ <!--
+ (1)
+ See <http://wiki.eclipse.org/Equinox/p2/p2.mirrorsURL>.
+ This will add the mirror and statistics properties to your
+ artifacts.jar, but NOT to artifacts.xml.xz,
+ since p2 can only read artifacts.xml.zx but now write into it
+ (https://bugs.eclipse.org/bugs/show_bug.cgi?id=467779).
+ artifacts.xml.xz will be handled later (from (2) on). -->
<id>add-repo-properties</id>
<goals>
<goal>eclipse-run</goal>
</goals>
<phase>package</phase>
<configuration>
- <appArgLine>-application org.eclipse.wtp.releng.tools.addRepoProperties</appArgLine>
- <argLine><![CDATA[-DartifactRepoDirectory=${project.build.directory}/repository -Dp2MirrorsURL=${p2.mirrorsURL} -Dp2StatsURI=${p2.statsURL} -DstatsTrackedArtifacts=${p2.statsTrackedArtifacts} -DstatsArtifactsSuffix=-${project.version}]]></argLine>
+ <applicationsArgs>
+ <arg>-application</arg>
+ <arg>org.eclipse.wtp.releng.tools.addRepoProperties</arg>
+ </applicationsArgs>
+ <jvmArgs>
+ <arg>-DartifactRepoDirectory=${project.build.directory}/repository</arg>
+ <arg>-Dp2MirrorsURL=${p2.mirrorsURL}</arg>
+ <arg>-Dp2StatsURI=${p2.statsURL}</arg>
+ <arg>-DstatsTrackedArtifacts=${p2.statsTrackedArtifacts}</arg>
+ <arg>-DstatsArtifactsSuffix=-${project.version}</arg>
+ </jvmArgs>
<work>${project.build.directory}/eclipserun-work-first</work>
<dependencies>
<dependency>
@@ -125,7 +142,7 @@
<layout>p2</layout>
</repository>
<repository>
- <url>http://download.eclipse.org/releases/mars</url>
+ <url>http://download.eclipse.org/releases/neon</url>
<layout>p2</layout>
</repository>
</repositories>
@@ -136,14 +153,27 @@
<goals>
<goal>eclipse-run</goal>
</goals>
- <phase>package</phase>
+ <!-- this must be executed after package, since during package we also
+ deal with XZ compressed artifacts -->
+ <phase>verify</phase>
<configuration>
- <appArgLine>-application org.eclipse.ant.core.antRunner -buildfile ${project.basedir}/../org.eclipse.emf.parsley.parent/ant/packaging-p2composite.ant p2.composite.add -Dsoftware.download.area=${parsley.download.area} -Dupdates.dir=${parsley.updates.dir} -Dsite.label="Emf Parsley Site" -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${unqualifiedVersion} -DbuildQualifier=${buildQualifier}</appArgLine>
+ <applicationsArgs>
+ <arg>-application</arg>
+ <arg>org.eclipse.ant.core.antRunner</arg>
+ <arg>-buildfile</arg>
+ <arg>${project.basedir}/../org.eclipse.emf.parsley.parent/ant/packaging-p2composite.ant</arg>
+ <arg>p2.composite.add</arg>
+ <arg>-Dsoftware.download.area=${parsley.download.area}</arg>
+ <arg>-Dupdates.dir=${parsley.updates.dir}</arg>
+ <arg>-Dsite.label="Emf Parsley Site"</arg>
+ <arg>-Dproject.build.directory=${project.build.directory}</arg>
+ <arg>-DunqualifiedVersion=${unqualifiedVersion}</arg>
+ <arg>-DbuildQualifier=${buildQualifier}</arg>
+ </applicationsArgs>
<repositories>
<repository>
- <id>mars</id>
+ <url>http://download.eclipse.org/releases/neon</url>
<layout>p2</layout>
- <url>http://download.eclipse.org/releases/mars</url>
</repository>
</repositories>
<dependencies>
@@ -181,6 +211,14 @@
<!-- copy the zipped p2 repository into download zips area -->
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
+ <dependencies>
+ <!-- Needed for XZ compression -->
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-compress</artifactId>
+ <version>1.4</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>copy-to-zips-download</id>
@@ -203,6 +241,53 @@
<goal>run</goal>
</goals>
</execution>
+ <execution>
+ <!-- (2)
+ Unpack artifacts.jar (which has already been processed) -->
+ <id>unjar-artifacts</id>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <unzip src="${project.build.directory}/repository/artifacts.jar"
+ dest="${project.build.directory}/repository/" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <!-- (3)
+ pack artifacts.xml into artifacts.xml.xz (rewrite) -->
+ <id>xz-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target name="xz-artifacts-xml">
+ <taskdef resource="org/apache/ant/compress/antlib.xml"
+ classpathref="maven.plugin.classpath" />
+ <xz
+ srcfile="${project.build.directory}/repository/artifacts.xml"
+ destfile="${project.build.directory}/repository/artifacts.xml.xz" />
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- (4)
+ Remove artifacts.xml (we don't need that anymore) -->
+ <id>remove-artifacts-xml</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <delete file="${project.build.directory}/repository/artifacts.xml"/>
+ </target>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>

Back to the top