-
Notifications
You must be signed in to change notification settings - Fork 82
/
platform-logging.sh
executable file
·39 lines (34 loc) · 1.22 KB
/
platform-logging.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
#!/bin/bash
set -e
if ! [ -e target/app ]
then
printf "# Building Maven project, so app JARs are available...\n"
mvn clean package
fi
echo "# Creating clean directories"
rm -rf target/logging/classes
mkdir -p target/logging/classes
rm -rf target/logging/mods
mkdir -p target/logging/mods
echo "# Compiling and packaging logger"
mkdir target/logging/classes/dev.nipafx.demo.java9.logging
javac \
-d target/logging/classes/dev.nipafx.demo.java9.logging \
src/platform_logging/java/dev/nipafx/demo/java9/api/platform_logging/logger/*.java
jar \
-c \
--file target/logging/mods/dev.nipafx.demo.java9.logging.jar \
-C target/logging/classes/dev.nipafx.demo.java9.logging/ .
echo "# Compiling and packaging app"
mkdir target/logging/classes/dev.nipafx.demo.java9.app
javac \
-p target/app \
-d target/logging/classes/dev.nipafx.demo.java9.app \
src/platform_logging/java/dev/nipafx/demo/java9/api/platform_logging/app/*.java
jar \
-c \
--file target/logging/mods/dev.nipafx.demo.java9.app.jar \
--main-class dev.nipafx.demo.java9.api.platform_logging.app.LoggingApplication \
-C target/logging/classes/dev.nipafx.demo.java9.app/ .
echo "# Running App"
java -verbose:gc -p target/app:target/logging/mods -m dev.nipafx.demo.javaX.app