我通过使用以下命令解决了这个问题。
cd metron-deployment/packaging/docker/rpm-docker
mvn clean install -DskipTests -PHDP-2.5.0.0 . .
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (docker-build) @ metron-rpm ---
Sending build context to Docker daemon 842.5 MB
Step 1/13 : FROM centos:centos6
---> d0957ffdf8a2
Step 2/13 : RUN yum install -y tar
---> Using cache
---> bdc0c1cfe815
Step 3/13 : RUN yum install -y wget
---> Using cache
---> a39bcec938e0
Step 4/13 : RUN yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
---> Using cache
---> 67857c9ce3c1
Step 5/13 : WORKDIR /usr/src
---> Using cache
---> afbc7a591163
Step 6/13 : RUN wget http://apache.cs.utah.edu/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz
---> Using cache
---> 4ea0b2ddde0d
Step 7/13 : RUN tar xzvf apache-maven-3.2.5-bin.tar.gz
---> Using cache
---> eab37a7e2958
Step 8/13 : RUN mv apache-maven-3.2.5 /opt/maven
---> Running in ee91532580b7
mv: cannot remove `apache-maven-3.2.5/LICENSE': No such file or directory
mv: cannot remove `apache-maven-3.2.5/NOTICE': No such file or directory
mv: cannot remove `apache-maven-3.2.5/README.txt': No such file or directory
mv: cannot remove `apache-maven-3.2.5/bin/m2.conf': No such file or directory
任何想法请帮助
谢谢
我已经更新了以下文件。但仍然是相同的错误
vi /etc/profile
export M2_HOME=/opt/maven
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export MAVEN_OPTS="-Xms512m -Xmx1024m"
source /etc/profile