diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6f91b298 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM maven:3.8.4-jdk-11 AS build + +COPY . /usr/src/app + +WORKDIR /usr/src/app + +RUN mvn install:install-file \ +-Dfile=jars/mason.20.jar \ +-DgroupId=mason \ +-DartifactId=mason \ +-Dversion=20 \ +-Dpackaging=jar \ +-DgeneratePom=true + +RUN ["scripts/build_AMLSim.sh"] + +ENTRYPOINT ["scripts/run_AMLSim.sh", "conf.json"] + + + diff --git a/pom.xml b/pom.xml index 9058085b..759dab1a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,29 +1,28 @@ - + 4.0.0 amlsim amlsim 1.0.0 - UTF-8 - 1.8 - ${maven.compiler.source} - + UTF-8 + 1.8 + ${maven.compiler.source} + - - - org.junit - junit-bom - 5.8.1 - pom - import - - - + + + org.junit + junit-bom + 5.8.1 + pom + import + + + @@ -44,7 +43,7 @@ mason 20 - + org.mockito mockito-inline @@ -58,22 +57,22 @@ - org.junit.jupiter - junit-jupiter - test - + org.junit.jupiter + junit-jupiter + test + - - - maven-compiler-plugin - 3.8.1 - - - maven-surefire-plugin - 2.22.2 - - - + + + maven-compiler-plugin + 3.8.1 + + + maven-surefire-plugin + 2.22.2 + + + \ No newline at end of file diff --git a/scripts/run_AMLSim.sh b/scripts/run_AMLSim.sh index 02983b76..17bae4fc 100755 --- a/scripts/run_AMLSim.sh +++ b/scripts/run_AMLSim.sh @@ -10,6 +10,8 @@ MAX_HEAP=4g CONF_JSON=$1 +export MAVEN_OPTS=" -Xms${MIN_HEAP} -Xmx${MAX_HEAP}" + if ! command -v mvn &> /dev/null then echo 'maven not installed. proceeding.'