aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Digulla2012-07-31 10:14:06 (EDT)
committerThanh Ha2012-07-31 10:14:06 (EDT)
commitad8e5b417cc6436a11226df43b6b887d9c0cdcbc (patch)
tree18b4bd952090d0ddbe14e6eda6f82fe94917af8c
parent7b652d0c4c75d4ac55d06965e527cbce760d874d (diff)
downloadeclipse.platform.releng.aggregator-ad8e5b417cc6436a11226df43b6b887d9c0cdcbc.zip
eclipse.platform.releng.aggregator-ad8e5b417cc6436a11226df43b6b887d9c0cdcbc.tar.gz
eclipse.platform.releng.aggregator-ad8e5b417cc6436a11226df43b6b887d9c0cdcbc.tar.bz2
Bug 386036 - Supply scripts for common tasks
-rwxr-xr-xbuild.sh43
-rw-r--r--settings.tpl20
-rw-r--r--setup.tpl9
3 files changed, 72 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..68d8efe
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+if [[ ! -e "setup.sh" ]]; then
+ echo "Copy setup.tpl to setup.sh and modify it for your local environment"
+ exit 1
+fi
+
+BASE=$( cd $( dirname "$0" ) > /dev/null ; pwd )
+
+. "$BASE/setup.sh"
+
+if [[ ! -e "${m2settings}" ]]; then
+ echo "Copy $HOME/.m2/settings.xml or settings.tpl to ${m2settings}"
+ exit 1
+fi
+
+mvnWrapper() {
+ mvn -Dmaven.repo.local="${m2repo}" --settings "${m2settings}" "$@" || exit 1
+}
+
+cmd="$1"
+
+case "$cmd" in
+ build ) #CMD Build all the sources
+ mvnWrapper -f eclipse-parent/pom.xml clean install
+ mvnWrapper -f maven-cbi-plugin/pom.xml clean install
+ mvnWrapper clean install -Dmaven.test.skip=true
+ echo "Build successful"
+ echo "You can find the installation files in $BASE/TMP/org.eclipse.sdk.epp/target/products/"
+ ls -l "$BASE/TMP/org.eclipse.sdk.epp/target/products"
+ ;;
+
+ test ) #CMD Run the tests. You must build at least once before you can run this
+ # TODO
+ ;;
+
+ * )
+ echo "Missing command. Available are:"
+ grep CMD "$0" | grep -v grep | sed -e "s:^[ \t]+::g" -e 's:[)] #CMD:-:'
+ ;;
+esac
+
+exit 0
diff --git a/settings.tpl b/settings.tpl
new file mode 100644
index 0000000..bc46ecf
--- /dev/null
+++ b/settings.tpl
@@ -0,0 +1,20 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
+ http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <localRepository/>
+ <interactiveMode/>
+ <usePluginRegistry/>
+ <offline/>
+ <pluginGroups>
+ </pluginGroups>
+ <servers>
+ </servers>
+ <mirrors>
+ </mirrors>
+ <proxies/>
+ <profiles>
+ </profiles>
+ <activeProfiles/>
+</settings>
+
diff --git a/setup.tpl b/setup.tpl
new file mode 100644
index 0000000..b77d5cb
--- /dev/null
+++ b/setup.tpl
@@ -0,0 +1,9 @@
+
+# Maven needs a local cache to store its files.
+# If you use Maven for other projects, you probably don't want to pollute the default repository
+# Use this variable to tell the build script where to create the Eclipse CBI Maven cache
+m2repo="$BASE/TMP/m2repo"
+
+# If you use your own Maven proxy, the build will probably fail.
+# Copy your settings.xml to this location to override the defaults.
+m2settings="$BASE/settings.xml"