-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
90 lines (77 loc) · 2.35 KB
/
build.ps1
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
84
85
86
87
88
89
90
##########################
# Copyright (C) 2020 Ondřej Vašíček <ondrej.vasicek.0@gmail.com>, <xvasic25@stud.fit.vutbr.cz>
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0
#
# SPDX-License-Identifier: EPL-2.0
##########################
param (
[switch]$h
)
$HELP="
Loads configuration files and then builds and installs the adapter
and its dependencies.
"
$USAGE=" Usage: $PSCommandPath [-h]
-h ... help
"
$USRPATH=$(pwd) # get the call directory
$ROOTDIR="$PSScriptRoot" # get the script directory
# source shared utils
. "$ROOTDIR\dev_tools\shared.ps1"
#
# main
#
if ($args.length -ne 0) {
invalid_arg $args[0] $USAGE
}
if ($h) {
print_help $HELP $USAGE
}
echo ""
echo "############################################################"
echo " Processing configuration files"
echo "############################################################"
echo ""
processConfFiles "$ROOTDIR"
echo ""
echo "############################################################"
echo " Building and Installing shared resources"
echo "############################################################"
echo ""
mvn -f "$ROOTDIR\domain\pom.xml" clean install
if ( ! $? ) {
exit $LastExitCode
}
mvn -f "$ROOTDIR\shared\pom.xml" clean install
if ( ! $? ) {
exit $LastExitCode
}
mvn install:install-file -Dfile="$ROOTDIR\lib\cz.vutbr.fit.group.verifit.arrowhead.client.jersey_0.1.0.202205231408.jar" -DgroupId='cz.vutbr.fit.group.verifit.arrowhead.client' -DartifactId='jersey' -Dversion='0.1.0.qualifier' -Dpackaging='jar'
if ( ! $? ) {
exit $LastExitCode
}
echo ""
echo "############################################################"
echo " Building and Installing the Compilation adapter"
echo "############################################################"
echo ""
mvn -f "$ROOTDIR\compilation\pom.xml" clean install
if ( ! $? ) {
exit $LastExitCode
}
echo ""
echo "############################################################"
echo " Building and Installing the Analysis adapter"
echo "############################################################"
echo ""
mvn -f "$ROOTDIR\analysis\pom.xml" clean install
if ( ! $? ) {
exit $LastExitCode
}
echo ""
echo "##### BUILD DONE ###########################################"
echo ""
exit 0