Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
N. Justus committed Feb 11, 2019
2 parents a9ef680 + ff697a8 commit de83c32
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@

FROM openmodelica/openmodelica:v1.12.0
RUN apt-get update && apt-get install -y openjdk-8-jre

RUN wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz
RUN tar xfvz /tmp/openjdk.tar.gz --directory /opt &&\
/opt/jdk-11.0.2/bin/java -version

RUN useradd -ms /bin/bash openmodelica
RUN mkdir -p /home/openmodelica/data &&\
chown -R openmodelica:openmodelica /home/openmodelica

ADD ./target/scala-2.12/mope-server-*.jar /opt
RUN mv /opt/mope-server-*.jar /opt/mope-server.jar
RUN mv /opt/mope-server-*.jar /opt/mope-server.jar &&\
chmod 777 /opt/mope-server.jar

USER openmodelica

EXPOSE 3000
CMD java -jar /opt/mope-server.jar --interface='0.0.0.0' --port=3000
CMD /opt/jdk-11.0.2/bin/java -jar /opt/mope-server.jar --interface='0.0.0.0' --port=3000
11 changes: 7 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ object Dependencies {
def fromGithub(url:String) = RootProject(uri(url))
def fromFile(url:String) = RootProject(file(url))
def omcApi(snapshot:Boolean=false) =
if(snapshot) "com.github.THM-MoTE" % "omc-java-api" % "master-SNAPSHOT"
else "de.thm.mni.mote" % "omc-java-api" % "0.3.5"
if(snapshot) Seq(
"org.antlr" % "antlr4-runtime" % "4.5.3",
"org.apache.commons" % "commons-lang3" % "3.5",
"org.zeromq" % "jeromq" % "0.4.3"
)
else Seq("de.thm.mni.mote" % "omc-java-api" % "0.3.5")

val jitpack = "jitpack" at "https://jitpack.io"

Expand All @@ -34,8 +38,7 @@ object Dependencies {
private val scalaUtilsVersion = "1.0.6"
private val scalaUtilsGroup = "org.scala-lang.modules"

val utils = Seq(
omcApi(false),
val utils = omcApi(true) ++ Seq(
scalaUtilsGroup %% "scala-parser-combinators" % scalaUtilsVersion,
"org.rogach" %% "scallop" % "3.1.1"
)
Expand Down

0 comments on commit de83c32

Please sign in to comment.