Hello Samy, Sometimes before, I builed ambari 2.7.7.0.0 successfully with the same issue. For the first issue abount Ambari Metrics Storm Sink (Legacy), you can skip legacy module, just remove <module>ambari-metrics-storm-sink-legacy</module> at ./ambari-metrics/pom.xml. For the second issue abount dependencies for ambari-metrics-timelineservice, you can try to change zookeeper version to 3.4.5 to replace hortonworks zookeeper.
One more thing, if you want to use the latest BIGTOP(3.2.0) stack rather than HDP stack, you can wait for release-3.0.0 or use trunk branch rather than 2.7.7.0.0, the issues abount compiling was solved in 3.0.0, and it will coming soon (https://lists.apache.org/thread/nd5nw7dvldkg4ro36pkpsyt1r1xo371s) Best regards, Luxiang Wang