-
Notifications
You must be signed in to change notification settings - Fork 103
/
build_tckugs.sh
59 lines (51 loc) · 1.8 KB
/
build_tckugs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash -xe
# Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
if [ -z "$M2_HOME" ]; then
export M2_HOME=/usr/share/apache-maven/
fi
if [ -z "$JAVA_HOME" ]; then
export JAVA_HOME=/opt/jdk-11.0.10
fi
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH
cd ${WORKSPACE}
export BASEDIR=`pwd`
export USERGUIDEDIR=$BASEDIR/user_guides
alltcks="caj concurrency el jacc jaspic jaxrs jaxws jca jms jpa jsf jsonb jsonp jsp jstl jta saaj securityapi servlet websocket"
cd $USERGUIDEDIR
rm -rf $USERGUIDEDIR/tmp
rm -rf $USERGUIDEDIR/userguides.zip
mkdir -p $USERGUIDEDIR/tmp/userguides
if [ -z "$1" ]; then
tck="all"
echo *************Building All TCK Userguides************
for j in $alltcks
do
echo *************Building $j TCK Userguide************
cd $USERGUIDEDIR/$j;mvn
cp -r $USERGUIDEDIR/$j/target/staging $USERGUIDEDIR/tmp/userguides/$j
done
bundlename="userguides_alltcks.zip"
else
for i in "$@"
do
echo *************Building $i TCK Userguide************
cd $USERGUIDEDIR/$i;mvn
cp -r $USERGUIDEDIR/$i/target/staging $USERGUIDEDIR/tmp/userguides/$i
done
bundlename="userguides.zip"
fi
cd $USERGUIDEDIR/tmp
chmod -R 777 userguides
zip -r $USERGUIDEDIR/$bundlename userguides/