-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_codegen.sh
More file actions
26 lines (16 loc) · 806 Bytes
/
Copy pathrun_codegen.sh
File metadata and controls
26 lines (16 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
targetProgram="${1:-"lists"}"
targetMethods="${2:-}"
# get all the methods like this -> add,get,size
targetMethods=$(echo "$targetMethods" | sed -E 's/\s*,\s*/,/g' | tr -d ' ')
#export MAVEN_OPTS="-Xmx512m -Xms128m -Xss2m"
cd codegen/
find src/main/java/com/generated_progs/ -type d -exec rm -r {} +
#find src/main/java/com/generated_templates/ -type d -exec rm -r {} +
mvn install
mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
mvn clean compile assembly:single
mvn install:install-file -Dfile=target/codegen-1.0-SNAPSHOT-jar-with-dependencies.jar \
-DgroupId=com.template -DartifactId=codegen -Dversion=1.0-SNAPSHOT -Dpackaging=jar
java -jar target/codegen-1.0-SNAPSHOT-jar-with-dependencies.jar $targetProgram $targetMethods
#mvn install #compiles the generated progs