FROM maven:3.3-alpine

WORKDIR /home
RUN echo '<toolchains><toolchain><type>jdk</type><provides><version>1.6</version></provides><configuration><jdkHome>/usr/lib/jvm/java-1.8-openjdk</jdkHome></configuration></toolchain></toolchains>' > toolchains.xml
ADD . /home
RUN mvn -t toolchains.xml package
RUN tar xvfz maven-color-gossip/target/maven-color-gossip-*-bundle.tar.gz -C $MAVEN_HOME
RUN rm $MAVEN_HOME/lib/slf4j-simple-1.7.*.jar

FROM maven:3.3

WORKDIR /home
RUN echo '<toolchains><toolchain><type>jdk</type><provides><version>1.6</version></provides><configuration><jdkHome>/usr/lib/jvm/java-8-openjdk-amd64/</jdkHome></configuration></toolchain></toolchains>' > toolchains.xml
ADD . /home
RUN mvn -t toolchains.xml package
RUN tar xvfz maven-color-gossip/target/maven-color-gossip-*-bundle.tar.gz -C $MAVEN_HOME
RUN rm $MAVEN_HOME/lib/slf4j-simple-1.7.*.jar

Fix maven 3.3 docker image
Fix maven 3.3 docker image

Use a non alpine image as it is not compatible with maven-surefire-plugin 2.20.1
https://issues.apache.org/jira/browse/SUREFIRE-1422
