JAMES-2107 Merge JAVA-6 and JAVA-8 compilation
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/75ccf89a Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/75ccf89a Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/75ccf89a Branch: refs/heads/master Commit: 75ccf89ab9c0513baa41db41910aa81119947208 Parents: 0809042 Author: benwa <btell...@linagora.com> Authored: Mon Jul 31 16:32:07 2017 +0700 Committer: benwa <btell...@linagora.com> Committed: Wed Aug 16 16:31:38 2017 +0700 ---------------------------------------------------------------------- dockerfiles/compilation/java-6/Dockerfile | 25 --------- dockerfiles/compilation/java-6/compile.sh | 56 -------------------- .../compilation/java-6/integration_tests.sh | 55 ------------------- dockerfiles/compilation/java-8/compile.sh | 6 +++ 4 files changed, 6 insertions(+), 136 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/75ccf89a/dockerfiles/compilation/java-6/Dockerfile ---------------------------------------------------------------------- diff --git a/dockerfiles/compilation/java-6/Dockerfile b/dockerfiles/compilation/java-6/Dockerfile deleted file mode 100644 index 509c467..0000000 --- a/dockerfiles/compilation/java-6/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Build James -# -# VERSION 1.0 - -FROM java:openjdk-6-jdk - -ENV GIT_VERSION 1:1.7.10.4-1+wheezy1 - -# Install Maven -WORKDIR /root -RUN wget http://mirrors.ircam.fr/pub/apache/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz -RUN tar -xvf apache-maven-3.2.5-bin.tar.gz -RUN ln -s /root/apache-maven-3.2.5/bin/mvn /usr/bin/mvn - -# Install git -RUN apt-get update -RUN apt-get install -y git - -# Copy the script -COPY compile.sh /root/compile.sh -COPY integration_tests.sh /root/integration_tests.sh - -# Define the entrypoint -WORKDIR /james-project -ENTRYPOINT ["/root/compile.sh"] http://git-wip-us.apache.org/repos/asf/james-project/blob/75ccf89a/dockerfiles/compilation/java-6/compile.sh ---------------------------------------------------------------------- diff --git a/dockerfiles/compilation/java-6/compile.sh b/dockerfiles/compilation/java-6/compile.sh deleted file mode 100755 index b0c1f82..0000000 --- a/dockerfiles/compilation/java-6/compile.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -e -# - -printUsage() { - echo "Usage : " - echo "./compile.sh [-s | --skipTests] SHA1" - echo " -s : Skip test" - echo " SHA1: SHA1 to build (optional)" - exit 1 -} - -ORIGIN=/origin -DESTINATION=/destination - -for arg in "$@" -do - case $arg in - -s|--skipTests) - SKIPTESTS="skipTests" - ;; - -*) - echo "Invalid option: -$OPTARG" - printUsage - ;; - *) - if ! [ -z "$1" ]; then - SHA1=$1 - fi - ;; - esac - if [ "0" -lt "$#" ]; then - shift - fi -done - -if [ -z "$SHA1" ]; then - SHA1=master -fi - -# Sources retrieval -git clone $ORIGIN/. -git checkout $SHA1 - -# Compilation - -if [ "$SKIPTESTS" = "skipTests" ]; then - mvn package -DskipTests -Pjpa,lucene,jpa-lucene,with-assembly -else - mvn package -Pjpa,lucene,jpa-lucene,with-assembly -fi - -# Retrieve result - -if [ $? -eq 0 ]; then - cp server/app/target/james-server-app-*-app.zip $DESTINATION -fi http://git-wip-us.apache.org/repos/asf/james-project/blob/75ccf89a/dockerfiles/compilation/java-6/integration_tests.sh ---------------------------------------------------------------------- diff --git a/dockerfiles/compilation/java-6/integration_tests.sh b/dockerfiles/compilation/java-6/integration_tests.sh deleted file mode 100755 index 03906ee..0000000 --- a/dockerfiles/compilation/java-6/integration_tests.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -e - -printUsage() { - echo "Usage : " - echo "./integration_tests.sh URL BRANCH JAMES_IP JAMES_IMAP_PORT" - echo " JAMES_IP: IP of the James server to be tests" - echo " JAMES_IMAP_PORT: Exposed IMAP port of this James server" - echo " SHA1(optional): Branch to build or master if none" - exit 1 -} - -ORIGIN=/origin - -for arg in "$@" -do - case $arg in - -*) - echo "Invalid option: -$OPTARG" - printUsage - ;; - *) - if ! [ -z "$1" ]; then - JAMES_ADDRESS=$1 - fi - if ! [ -z "$2" ]; then - JAMES_IMAP_PORT=$2 - fi - if ! [ -z "$3" ]; then - SHA1=$3 - fi - ;; - esac -done - -if [ -z "$JAMES_ADDRESS" ]; then - echo "You must provide a JAMES_ADDRESS" - printUsage -fi - -if [ -z "$JAMES_IMAP_PORT" ]; then - echo "You must provide a JAMES_IMAP_PORT" - printUsage -fi - -if [ -z "$SHA1" ]; then - SHA1=master -fi - -export JAMES_ADDRESS=$JAMES_ADDRESS -export JAMES_IMAP_PORT=$JAMES_IMAP_PORT - -git clone $ORIGIN/. -git checkout $SHA1 - -mvn -Dtest=ExternalJamesTest -DfailIfNoTests=false -pl org.apache.james:apache-james-mpt-external-james -am test http://git-wip-us.apache.org/repos/asf/james-project/blob/75ccf89a/dockerfiles/compilation/java-8/compile.sh ---------------------------------------------------------------------- diff --git a/dockerfiles/compilation/java-8/compile.sh b/dockerfiles/compilation/java-8/compile.sh index e0192b2..afc499c 100755 --- a/dockerfiles/compilation/java-8/compile.sh +++ b/dockerfiles/compilation/java-8/compile.sh @@ -12,6 +12,7 @@ printUsage() { ORIGIN=/origin CASSANDRA_DESTINATION=/cassandra/destination JPA_DESTINATION=/jpa/destination +SPRING_DESTINATION=/spring/destination for arg in "$@" do @@ -71,4 +72,9 @@ if [ $? -eq 0 ]; then cp server/container/cli/target/james-server-cli.jar $JPA_DESTINATION || true cp -r server/container/cli/target/james-server-cli.lib $JPA_DESTINATION || true fi + + if [ -d "$SPRING_DESTINATION" ]; then + echo "Copying SPRING jars" + cp server/app/target/james-server-app-*-app.zip $SPRING_DESTINATION + fi fi --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org