FROM maven:3-jdk-8

COPY m2_temp/* /root/.m2/repository/

RUN git clone --depth=1 --branch=master https://github.com/eclipse/lyo.trs-client.git && cd lyo.trs-client && mvn clean install -Dmaven.test.skip=true -B -q
RUN git clone --depth=1 --branch=master https://github.com/eclipse/lyo.trs-server.git && cd lyo.trs-server && mvn clean install -Dmaven.test.skip=true -B -q

FROM maven:3-jdk-8

COPY m2_temp/* /root/.m2/repository/

RUN git clone --depth=1 --branch=mqtt-2019 https://github.com/eclipse/lyo.trs-client.git && cd lyo.trs-client && mvn clean install -Dmaven.test.skip=true -B -q
RUN git clone --depth=1 --branch=master https://github.com/eclipse/lyo.trs-server.git && cd lyo.trs-server && mvn clean install -Dmaven.test.skip=true -B -q

Use 'mqtt-2019' branch on TRS Client
Use 'mqtt-2019' branch on TRS Client

Signed-off-by: Andrew Berezovskyi <3651b37c3749fcd568b3a6fa4973cfc6e6df6402@kth.se>
