Fix pom.xml
[dcaegen2.git] / mvn-phase-script.sh
1 #!/bin/bash
2
3 echo "running script: [$0] for module [$1] at stage [$2]"
4
5 echo "=> Prepare environment "
6 #env
7
8 TIMESTAMP=$(date +%C%y%m%dT%H%M%S) 
9 export BUILD_NUMBER="${TIMESTAMP}"
10
11 # expected environment variables 
12 if [ -z "${MVN_NEXUSPROXY}" ]; then
13     echo "MVN_NEXUSPROXY environment variable not set.  Cannot proceed"
14     exit
15 fi
16 MVN_NEXUSPROXY_HOST=$(echo $MVN_NEXUSPROXY |cut -f3 -d'/' | cut -f1 -d':')
17
18
19 # use the version text detect which phase we are in in LF CICD process: verify, merge, or (daily) release
20
21 # mvn phase in life cycle 
22 MVN_PHASE="$2"
23
24 case $MVN_PHASE in
25 clean)
26   echo "==> clean phase script"
27   ;;
28 generate-sources)
29   echo "==> generate-sources phase script"
30   ;;
31 compile)
32   echo "==> compile phase script"
33   ;;
34 test)
35   echo "==> test phase script"
36   ;;
37 package)
38   echo "==> package phase script"
39   ;;
40 install)
41   echo "==> install phase script"
42   ;;
43 deploy)
44   echo "==> deploy phase script"
45   ;;
46 *)
47   echo "==> unprocessed phase"
48   ;;
49 esac
50