-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·83 lines (70 loc) · 2.25 KB
/
build.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
if [ -z ${NCSA_DEV_INPUT+x} ]
then
echo "no sources, skipping..."
exit 1
fi
if [ -z ${NCSA_DEV_OUTPUT+x} ]
then
echo "no output directory, skipping..."
exit 1
fi
CILOGON_ROOT=$NCSA_DEV_INPUT/cilogon
CILOGON_OA2_DEPLOY=$NCSA_DEV_OUTPUT/cilogon
CILOGON_OA2_TOOLS=$CILOGON_ROOT/admin
if [ ! -d "$CILOGON_OA2_DEPLOY" ]
then
mkdir "$CILOGON_OA2_DEPLOY"
else
echo " deploy target directory exists, cleaning..."
cd "$CILOGON_OA2_DEPLOY"
rm -Rf *
fi
cd $CILOGON_ROOT
echo "building CILogon"
mvn clean install > maven.log
if [[ $? -ne 0 ]] ; then
echo "CILogon maven build failed, exiting..."
exit 1
fi
echo " done!"
echo "building CILogon tools"
cd $CILOGON_OA2_TOOLS
mvn -P cli package > cli.log
if [[ $? -ne 0 ]] ; then
echo "CILogon maven build for CLI failed, exiting..."
exit 1
fi
echo " done!"
echo "deploying CILogon tools"
cp "$CILOGON_OA2_TOOLS/target/cilogon-oa2-cli-jar-with-dependencies.jar" $CILOGON_OA2_DEPLOY/cilogon-oa2-cli.jar
cp $CILOGON_ROOT/server/target/oauth2.war $CILOGON_OA2_DEPLOY/
cp $CILOGON_ROOT/client/target/cilogon-oa2-client.war $CILOGON_OA2_DEPLOY/
cp $CILOGON_OA2_TOOLS/src/main/scripts/cilogon-oa2-cli $CILOGON_OA2_DEPLOY
cp $CILOGON_OA2_TOOLS/src/main/resources/*.sql $CILOGON_OA2_DEPLOY
cd $CILOGON_OA2_DEPLOY
echo " done!"
#CILogon QDL support
cd $CILOGON_ROOT/qdl
mvn -P qdl package > qdl.log
if [[ $? -ne 0 ]]
then
echo "CILogon maven build for QDL extensions failed, exiting..."
exit 1
fi
cp target/cilogon-qdl-jar-with-dependencies.jar $CILOGON_OA2_DEPLOY/qdl.jar
echo " ... done!"
#cd target
#cp cil-qdl-jar-with-dependencies.jar $CILOGON_OA2_DEPLOY/cil-qdl.jar
#
# The next command takes the qdl.jar file in qdl_root and creates and installer jar_name in target_dir
# It explodes the qdl.jar file in the target_dir and re-assembles it into the installer.
# create_installer.sh qdl_root target_dir jar_name
# /home/ncsa/dev/ncsa-git/qdl/language/src/main/scripts/create_installer.sh $CILOGON_ROOT/qdl $CILOGON_OA2_DEPLOY/cil-qdl cil-qdl-installer.jar
cd "$CILOGON_ROOT/qdl/src/main/scripts"
echo "building CILogon QDL installer"
./create_installer.sh
if [[ $? -ne 0 ]] ; then
echo "CILogon create installer failed"
exit 1
fi
echo " done!"