命令“ / bin / sh -c mvn软件包”返回了非零代码:1

时间:2020-04-10 12:16:59

标签: dockerfile docker-maven-plugin

我正在尝试为我的maven项目编写一个Dockerfile。这是我的Dockerfile中的代码片段:

FROM maven:latest
MAINTAINER Syed R Abdullah (syed.r.abdullah@gmail.com)
COPY pom.xml /usr/local/service/pom.xml
COPY src /usr/local/service/src
WORKDIR /usr/local/service
RUN mvn package
CMD ["java","-cp","target/generatename-0.0.1-SNAPSHOT.jar","com.syed.generatename.GenerateName"]

我收到以下错误:

The command '/bin/sh -c mvn package' returned a non-zero code: 1

我该如何解决?谢谢。

0 个答案:

没有答案