Support Questions

Find answers, ask questions, and share your expertise

i have problem when i try write command "mvn clean install" on centos 7

avatar
Explorer

42388-metron-error.pngi have problem with "mvn clean install" please help me

7 REPLIES 7

avatar
Master Mentor

@anggit wisnu

Can you try adding "-Drat.skip" something like following to see if it proceeds:

# mvn clean install  -Drat.skip

OR

# mvn clean install  -Drat.skip=true

.

This will skip the plugin execution, e.g. for technical builds that do not take license compliance into account.

http://creadur.apache.org/rat/apache-rat-plugin/check-mojo.html#skip

avatar
Explorer

thanks for your attention with my problem, but that not success fix my problem

avatar
Super Collaborator

Hey @anggit wisnu, you could also try mvn clean package -DskipTests first to check if it runs properly, and then run mvn install.

Also, can you also tell more about your test environment, version of metron you are using? Preferably paste the output of metron-deployment/scripts/platform-info.sh command.

avatar
Explorer

@asubramanian my metron version is 0.3.1 and my error in stellar-common test.

The output file platform-info.sh like this :

#!/usr/bin/env bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#
# extracts information from the host environment that is useful for
# troubleshooting Apache Metron deployments
#
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# extract metron version from the pom
METRON_VERSION=`cat $CWD/../../pom.xml | grep "<version>" | head -1 | sed -ne '/version/{s/.*<version>\(.*\)<\/version>.*/\1/p;q;}'`
echo "Metron $METRON_VERSION"

# is this a git repo?
IS_GIT_REPO=`git rev-parse --is-inside-work-tree`
if [ "$IS_GIT_REPO" == "true" ]; then

# current branch
echo "--"
git branch | grep "*"

# last commit
echo "--"
git log -n 1

# local changes since last commit
echo "--"
git diff --stat
fi

# ansible
echo "--"
ansible --version

# vagrant
echo "--"
vagrant --version

# python
echo "--"
python --version 2>&1

# maven
echo "--"
mvn --version

# docker
echo "--"
docker --version

# node
echo "--"
echo "node"
node --version

# npm
echo "--"
echo "npm"
npm --version


# operating system
echo "--"
uname -a

# system resources
echo "--"
case "${OSTYPE}" in
linux*)
cat /proc/meminfo | grep -i MemTotal | awk '{print "Total System Memory = " $2/1024 " MB"}'
cat /proc/cpuinfo | egrep 'model\ name' | uniq | cut -d: -f2 | awk '{print "Processor Model:" $0}'
cat /proc/cpuinfo | egrep 'cpu\ MHz' | uniq | cut -d: -f2 | awk '{print "Processor Speed:" $0 " MHz"}'
cat /proc/cpuinfo | grep -i '^processor' | wc -l | awk '{print "Total Physical Processors: " $0}'
cat /proc/cpuinfo | grep -i cores | cut -d: -f2 | awk '{corecount+=$1} END {print "Total cores: " corecount}'
echo "Disk information:"
df -h | grep "^/"
if [[ $(egrep '(vmx|svm)' /proc/cpuinfo) ]]; then
echo "This CPU appears to support virtualization"
else
echo "This CPU may not support virtualization"
fi
;;
darwin*)
sysctl hw.memsize | awk '{print "Total System Memory = " $2/1048576 " MB"}'
sysctl machdep.cpu | grep 'machdep.cpu.brand_string' | cut -d: -f2 | cut -d\@ -f1 | awk '{print "Processor Model:" $0}'
sysctl machdep.cpu | grep 'machdep.cpu.brand_string' | cut -d: -f2 | cut -d\@ -f2 | awk '{print "Processor Speed:" $0}'
sysctl hw.physicalcpu | cut -d: -f2 | awk '{print "Total Physical Processors:" $0}'
sysctl machdep.cpu | grep 'machdep.cpu.core_count' | cut -d: -f2 | cut -d\@ -f2 | awk '{print "Total cores:" $0}'
echo "Disk information:"
df -h | grep "^/"
if [[ $(sysctl kern.hv_support | awk -F' ' '{print $2}') == "1" && $(sysctl -a | grep machdep.cpu.features | grep VMX) ]]; then
echo "This CPU appears to support virtualization"
else
echo "This CPU may not support virtualization"
fi
;;
*)
echo "Unable to detect system resources for ${OSTYPE}"
;;
esac

avatar
Super Collaborator

@anggit wisnu - did you try with the mvn clean package -DskipTests option to see if it works?

Also, can you execute the platform-info.sh script and paste the output from running it. Here is a sample output from my environment.

➜  metron-deployment git:(master) ✗ sh scripts/platform-info.sh
Metron 0.4.2
--
* master
--
--
--
ansible 2.0.0.2
  config file = /Users/asubramanian/Desktop/Metron/anand-metron-fork/incubator-metron/metron-deployment/ansible.cfg
  configured module search path = extra_modules
--
Vagrant 1.8.1
--
Python 2.7.12
--
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
--
Docker version 1.12.1, build 23cf638, experimental
--
node
v7.10.0
--
npm
4.2.0
--
Darwin HW12724.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
--
Total System Memory = 16384 MB
Processor Model: Intel(R) Core(TM) i7-4870HQ CPU
Processor Speed: 2.50GHz
Total Physical Processors: 4
Total cores: 4
Disk information:
/dev/disk1     465Gi  398Gi   67Gi    86% 2316787 4292650492    0%   /
/dev/disk2s3   165Mi  162Mi  3.1Mi    99%     167 4294967112    0%   /Volumes/Firefox
/dev/disk3s3   229Mi  225Mi  3.7Mi    99%     167 4294967112    0%   /Volumes/FirefoxDeveloperEdition
/dev/disk4s2   148Mi  148Mi    0Bi   100%     159 4294967120    0%   /Volumes/Firefox 1
/dev/disk5s1   414Mi  411Mi  2.6Mi   100%    2865 4294964414    0%   /Volumes/PyCharm CE
This CPU appears to support virtualization
<br>

avatar
Super Collaborator

@anggit wisnu

You could just put this extra switch to your mvn cmd:

-Drat.numUnapprovedLicenses=100

or

-DskipITs

avatar
Contributor

When cloning and building Metron locally you have to be careful about adding extra files within your local copy. There is a plugin that runs (Apache Rat) that checks for licenses whenever you build. You likely added some files that don't have license headers and your best bet is to remove the files flagged in /path/to/metron/target/rat.txt.