2010-01-30 00:19:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#######################################################################
|
|
|
|
# this is a first attempt to document the build of the distribution
|
|
|
|
# paths are hard-coded and obviously this is for a Cygwin/Windows combo
|
|
|
|
#######################################################################
|
2013-03-05 05:42:51 +00:00
|
|
|
rm -rf bootstrap build dist distribution java-repository
|
2010-01-30 00:19:06 +00:00
|
|
|
unset ANT_HOME
|
2011-04-21 16:34:44 +00:00
|
|
|
# OS specific support. $var _must_ be set to either true or false.
|
2017-12-24 09:15:30 +01:00
|
|
|
cygwin=false
|
|
|
|
darwin=false
|
|
|
|
mingw=false
|
|
|
|
linux=false
|
2011-04-21 16:34:44 +00:00
|
|
|
case "`uname`" in
|
2017-12-24 09:15:30 +01:00
|
|
|
CYGWIN*) cygwin=true;;
|
2011-04-21 16:34:44 +00:00
|
|
|
Darwin*) darwin=true;;
|
2017-12-24 09:15:30 +01:00
|
|
|
MINGW*) mingw=true;;
|
|
|
|
Linux) linux=true;;
|
2011-04-21 16:34:44 +00:00
|
|
|
esac
|
2017-12-24 09:15:30 +01:00
|
|
|
if $cygwin; then
|
2011-04-21 16:34:44 +00:00
|
|
|
export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.5.0_22"
|
|
|
|
JDK_VERSION=1.5
|
|
|
|
fi
|
|
|
|
if $darwin; then
|
|
|
|
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
|
|
|
|
JDK_VERSION=1.6
|
2017-12-24 09:15:30 +01:00
|
|
|
fi
|
2011-04-25 21:39:52 +00:00
|
|
|
if $linux; then
|
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
|
|
|
|
JDK_VERSION=1.6
|
|
|
|
fi
|
2014-04-30 04:05:58 +00:00
|
|
|
# check that one can build under maven
|
|
|
|
mvn -f src/etc/poms/pom.xml -DskipTests package
|
|
|
|
rm -rf target
|
2010-01-30 00:19:06 +00:00
|
|
|
export PATH=$JAVA_HOME/bin:$PATH
|
|
|
|
echo ANT_HOME=$ANT_HOME
|
|
|
|
echo JAVA_HOME=$JAVA_HOME
|
|
|
|
which java
|
2011-04-21 17:55:04 +00:00
|
|
|
echo running build under JDK $JDK_VERSION
|
2017-12-24 09:15:30 +01:00
|
|
|
./build.sh dist-lite
|
2011-04-21 16:34:44 +00:00
|
|
|
echo running the tests and doing the distribution
|
2010-12-08 22:53:12 +00:00
|
|
|
dist/bin/ant -nouserlib -lib lib/optional run-tests distribution
|