-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
38 lines (34 loc) · 986 Bytes
/
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
#!/bin/zsh
# Declare all the projects
declare -a StringArray=(
"myztic-core"
"myztic-essentials"
"myztic-streak-system"
"myztic-world-manager"
"myztic-player-profiles")
# Declare which folder you need the compiled jars to be moved
# For ex: the mc-server plugins folder
targetPluginFolder=/Users/rounick/IdeaProjects/MCServer_1.19.3/plugins
echo "-----------------------------"
echo "Running maven build commands"
echo "-----------------------------"
echo Removing existing compiled jars...
rm target/*
for val in ${StringArray[@]}; do
echo "Building project "$val"..."
cd $val
mvn clean package install
cd ../
done
echo "-----------------------------------"
echo "Completed executing maven commands"
echo "-----------------------------------"
echo Moving compiled jars to target folder...
echo Target folder: $targetPluginFolder
cd target/
for f in *.jar
do
echo Moving $f...
cp $f $targetPluginFolder
done
echo Completed moving all jars to target folder!