diff options
-rw-r--r-- | packages/org.eclipse.epp.package.rcp.product/pom.xml | 44 | ||||
-rw-r--r-- | releng/org.eclipse.epp.config/parent/pom.xml | 3 | ||||
-rwxr-xr-x | releng/org.eclipse.epp.config/tools/createArchives.sh | 44 |
3 files changed, 90 insertions, 1 deletions
diff --git a/packages/org.eclipse.epp.package.rcp.product/pom.xml b/packages/org.eclipse.epp.package.rcp.product/pom.xml index d0fab608..cb84d9a0 100644 --- a/packages/org.eclipse.epp.package.rcp.product/pom.xml +++ b/packages/org.eclipse.epp.package.rcp.product/pom.xml @@ -76,6 +76,7 @@ <goal>materialize-products</goal> </goals> </execution> + <!-- <execution> <id>archive-products</id> <phase>pre-integration-test</phase> @@ -83,18 +84,23 @@ <goal>archive-products</goal> </goals> </execution> + --> </executions> <configuration> + <!-- <formats> <win32>zip</win32> <linux>tar.gz</linux> <macosx>tar.gz</macosx> </formats> + --> <products> <product> <id>${project.artifactId}</id> <rootFolder>eclipse</rootFolder> - <archiveFileName>${build}_eclipse-${eclipse.epp.id}-${eclipse.simultaneous.release.id}</archiveFileName> + <!-- + <archiveFileName>${project.build}_eclipse-${eclipse.epp.id}-${eclipse.simultaneous.release.id}</archiveFileName> + --> </product> </products> <profile>${project.artifactId}</profile> @@ -105,6 +111,42 @@ <profiles> <profile> + <id>archiving</id> + <!-- This profile is only activated when running the build on a Unix-like OS where we can expect a working Bash --> + <activation> + <activeByDefault>false</activeByDefault> + <os> + <family>unix</family> + </os> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>archive-products</id> + <phase>pre-integration-test</phase> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + <configuration> + <executable>${basedir}/../../releng/org.eclipse.epp.config/tools/createArchives.sh</executable> + <arguments> + <argument>${eclipse.epp.archiveDirectory}</argument> + <argument>${project.build.directory}/products/epp.package.${eclipse.epp.id}</argument> + <argument>${project.build}_eclipse-${eclipse.epp.id}-${eclipse.simultaneous.release.id}</argument> + </arguments> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> <id>eclipse-sign</id> <build> <plugins> diff --git a/releng/org.eclipse.epp.config/parent/pom.xml b/releng/org.eclipse.epp.config/parent/pom.xml index 3c66a3a3..9bdd9595 100644 --- a/releng/org.eclipse.epp.config/parent/pom.xml +++ b/releng/org.eclipse.epp.config/parent/pom.xml @@ -28,6 +28,9 @@ <cbi.version>1.0.5</cbi.version> <maven.resources.version>2.6</maven.resources.version> <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format> + <!-- The location that is used to assemble the single EPP configuration p2 repository --> + <eclipse.epp.archiveDirectory>${basedir}/../../archive/</eclipse.epp.archiveDirectory> + <!-- The location that is used to assemble the single EPP configuration p2 repository --> <eclipse.epp.targetRepository>${basedir}/../../repository/</eclipse.epp.targetRepository> <!-- ID used to generate the filename of the packages --> <eclipse.simultaneous.release.id>luna-M6</eclipse.simultaneous.release.id> diff --git a/releng/org.eclipse.epp.config/tools/createArchives.sh b/releng/org.eclipse.epp.config/tools/createArchives.sh new file mode 100755 index 00000000..9aa14e60 --- /dev/null +++ b/releng/org.eclipse.epp.config/tools/createArchives.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +if [[ "$#" -ne 3 ]]; then + echo "Illegal number of parameters" + exit 1 +fi + +TARGET_DIR="${1}" +SOURCE_DIR="${2}" +BASENAME="${3}" + +if [[ ! -d "${TARGET_DIR}" ]]; then + echo "Creating target directory ${TARGET_DIR}" + mkdir -p ${TARGET_DIR} +fi + +if [[ ! -d "${SOURCE_DIR}" ]]; then + echo "Source directory ${SOURCE_DIR} does not exist" + exit 1 +fi + +# definition of OS, WS, ARCH, FORMAT combinations - DO NOT FORGET to adjust the for loop +OSes=( win32 win32 linux linux macosx macosx ) +WSes=( win32 win32 gtk gtk cocoa cocoa ) +ARCHes=( x86 x86_64 x86 x86_64 x86 x86_64 ) +FORMAT=( zip zip tar.gz tar.gz tar.gz tar.gz ) + +for index in 0 1 2 3 4 5; +do + echo -n "...EPP building ${BASENAME} for ${OSes[$index]} ${WSes[$index]} ${ARCHes[$index]} " + EXTENSION="${OSes[$index]}.${WSes[$index]}.${ARCHes[$index]}" + PACKAGE_DIR="${SOURCE_DIR}/${OSes[$index]}/${WSes[$index]}/${ARCHes[$index]}" + # TODO check existence of directory + cd "${PACKAGE_DIR}" + if [[ ${OSes[$index]} = "win32" ]]; then + PACKAGEFILE="${BASENAME}-${EXTENSION}.zip" + zip -r -o -q ${TARGET_DIR}/${PACKAGEFILE} eclipse + else + PACKAGEFILE="${BASENAME}-${EXTENSION}.tar.gz" + tar zc --owner=100 --group=100 -f ${TARGET_DIR}/${PACKAGEFILE} eclipse + fi + echo "...successfully finished ${OSes[$index]} ${WSes[$index]} ${ARCHes[$index]} package build: ${PACKAGEFILE}" +done + |