Linked Questions

Popular Questions

Run mvn package on docker file

Asked by At

I'm trying to generate the jar for a maven project before building the image using a docker file:

FROM maven:3.2-jdk-7-onbuild

RUN mkdir /api

COPY . /api

RUN mvn package -f /api/pom.xml

EXPOSE 9000

Is this even possible? What i'm trying to do is to create a jar to execute it later.

I'm getting this among others:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar (default-jar) on project deivapi: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.6:jar failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-jar-plugin:2.6:jar: java.lang.ExceptionInInitializerError: null
[ERROR]

Related Questions