Support Questions

Find answers, ask questions, and share your expertise

trying to build Ambari 2.4.1.0 from Source on Centos6

avatar
Master Mentor

My steps are according to the wiki for RHEL6

https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development

mvn versions:set -DnewVersion=2.4.1.0
pushd ambari-metrics
mvn versions:set -DnewVersion=2.4.1.0
popd
mvn -B clean install package rpm:rpm -DskipTests -Dpython.ver="python >= 2.6" -Preplaceurl

failing on

[WARNING] + umask 022
[WARNING] + cd /home/vagrant/ambari/ambari-admin/target/rpm/ambari-admin/BUILD
[WARNING] + /bin/rm -rf /home/vagrant/ambari/ambari-admin/target/rpm/ambari-admin/buildroot
[WARNING] + exit 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ambari-metrics 2.4.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ ambari-metrics ---
[INFO] Deleting /home/vagrant/ambari/ambari-metrics/target
[INFO] Deleting /home/vagrant/ambari/ambari-metrics (includes = [**/*.pyc], excludes = [])
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:parse-version (parse-version) @ ambari-metrics ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:regex-property (regex-property) @ ambari-metrics ---
[INFO] No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*' found in '2.4.1.0'. The initial value '2.4.1.0' is left as-is...
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:regex-property (parse-package-version) @ ambari-metrics ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Ambari Main ....................................... SUCCESS [14.704s]
[INFO] Apache Ambari Project POM ......................... SUCCESS [0.292s]
[INFO] Ambari Web ........................................ SUCCESS [2:31.163s]
[INFO] Ambari Views ...................................... SUCCESS [3.479s]
[INFO] Ambari Admin View ................................. SUCCESS [16.762s]
[INFO] ambari-metrics .................................... FAILURE [0.375s]
[INFO] Ambari Metrics Common ............................. SKIPPED
[INFO] Ambari Metrics Hadoop Sink ........................ SKIPPED
[INFO] Ambari Metrics Flume Sink ......................... SKIPPED
[INFO] Ambari Metrics Kafka Sink ......................... SKIPPED
[INFO] Ambari Metrics Storm Sink ......................... SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) ................ SKIPPED
[INFO] Ambari Metrics Collector .......................... SKIPPED
[INFO] Ambari Metrics Monitor ............................ SKIPPED
[INFO] Ambari Metrics Grafana ............................ SKIPPED
[INFO] Ambari Metrics Assembly ........................... SKIPPED
[INFO] Ambari Server ..................................... SKIPPED
[INFO] Ambari Functional Tests ........................... SKIPPED
[INFO] Ambari Agent ...................................... SKIPPED
[INFO] Ambari Client ..................................... SKIPPED
[INFO] Ambari Python Client .............................. SKIPPED
[INFO] Ambari Groovy Client .............................. SKIPPED
[INFO] Ambari Shell ...................................... SKIPPED
[INFO] Ambari Python Shell ............................... SKIPPED
[INFO] Ambari Groovy Shell ............................... SKIPPED
[INFO] ambari-logsearch .................................. SKIPPED
[INFO] Ambari Logsearch Appender ......................... SKIPPED
[INFO] Ambari Logsearch Solr Client ...................... SKIPPED
[INFO] Ambari Logsearch Portal ........................... SKIPPED
[INFO] Ambari Logsearch Log Feeder ....................... SKIPPED
[INFO] Ambari Logsearch Assembly ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:08.672s
[INFO] Finished at: Fri Sep 23 13:46:30 UTC 2016
[INFO] Final Memory: 28M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:1.8:regex-property (parse-package-version) on project ambari-metrics: No match to regex '^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*' found in '2.4.1.0'. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

1 ACCEPTED SOLUTION

avatar
3 REPLIES 3

avatar

avatar

@Artem Ervits

I guess why we need to use "2.4.1.0.1" instead of "2.4.1.0" for metrics because

In ambari-metrics "pom.xml" we will find : <failIfNoMatch>true</failIfNoMatch>

<regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
<replacement>$1.$2.$3.$4</replacement>
<failIfNoMatch>true</failIfNoMatch>

avatar
Master Mentor

it worked with the suggested change