blob: e280557608610599fcc02b11a09195617239d62d [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia at 2017-03-16
| Rendered using Apache Maven Fluido Skin 1.3.0
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Revision-yyyymmdd" content="20170316" />
<meta http-equiv="Content-Language" content="en" />
<title>Apache Atlas &#x2013; Tools required to build and run Apache Atlas on Eclipse</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script type="text/javascript" src="./js/apache-maven-fluido-1.3.0.min.js"></script>
<script type="text/javascript">$( document ).ready( function() { $( '.carousel' ).carousel( { interval: 3500 } ) } );</script>
</head>
<body class="topBarEnabled">
<div id="topbar" class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<div class="container" style="width: 68%;"><div class="nav-collapse">
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Atlas <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="index.html" title="About">About</a>
</li>
<li> <a href="https://cwiki.apache.org/confluence/display/ATLAS" title="Wiki">Wiki</a>
</li>
<li> <a href="https://cwiki.apache.org/confluence/display/ATLAS" title="News">News</a>
</li>
<li> <a href="https://git-wip-us.apache.org/repos/asf/incubator-atlas.git" title="Git">Git</a>
</li>
<li> <a href="https://issues.apache.org/jira/browse/ATLAS" title="Jira">Jira</a>
</li>
<li> <a href="https://cwiki.apache.org/confluence/display/ATLAS/PoweredBy" title="Powered by">Powered by</a>
</li>
<li> <a href="http://blogs.apache.org/atlas/" title="Blog">Blog</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Information <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="project-info.html" title="Summary">Summary</a>
</li>
<li> <a href="mail-lists.html" title="Mailing Lists">Mailing Lists</a>
</li>
<li> <a href="http://webchat.freenode.net?channels=apacheatlas&uio=d4" title="IRC">IRC</a>
</li>
<li> <a href="team-list.html" title="Team">Team</a>
</li>
<li> <a href="issue-tracking.html" title="Issue Tracking">Issue Tracking</a>
</li>
<li> <a href="source-repository.html" title="Source Repository">Source Repository</a>
</li>
<li> <a href="license.html" title="License">License</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Releases <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="http://www.apache.org/dyn/closer.cgi/incubator/atlas/0.8.0-incubating/" title="0.8-incubating">0.8-incubating</a>
</li>
<li> <a href="http://archive.apache.org/dist/incubator/atlas/0.7.1-incubating/" title="0.7.1-incubating">0.7.1-incubating</a>
</li>
<li> <a href="http://archive.apache.org/dist/incubator/atlas/0.7.0-incubating/" title="0.7-incubating">0.7-incubating</a>
</li>
<li> <a href="http://archive.apache.org/dist/incubator/atlas/0.6.0-incubating/" title="0.6-incubating">0.6-incubating</a>
</li>
<li> <a href="http://archive.apache.org/dist/incubator/atlas/0.5.0-incubating/" title="0.5-incubating">0.5-incubating</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="../index.html" title="latest">latest</a></li>
<li><a href="../0.8.0-incubating/index.html" title="0.8-incubating">0.8-incubating</a></li>
<li><a href="../0.7.1-incubating/index.html" title="0.7.1-incubating">0.7.1-incubating</a></li>
<li><a href="../0.7.0-incubating/index.html" title="0.7-incubating">0.7-incubating</a></li>
<li><a href="../0.6.0-incubating/index.html" title="0.6-incubating">0.6-incubating</a></li>
<li><a href="../0.5.0-incubating/index.html" title="0.5-incubating">0.5-incubating</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a>
<ul class="dropdown-menu">
<li> <a href="http://www.apache.org/foundation/how-it-works.html" title="How Apache Works">How Apache Works</a>
</li>
<li> <a href="http://www.apache.org/foundation/" title="Foundation">Foundation</a>
</li>
<li> <a href="http://www.apache.org/foundation/sponsorship.html" title="Sponsoring Apache">Sponsoring Apache</a>
</li>
<li> <a href="http://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a>
</li>
</ul>
</li>
</ul>
<form id="search-form" action="http://www.google.com/search" method="get" class="navbar-search pull-right" >
<input value="http://atlas.incubator.apache.org" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=search-form"></script>
<iframe src="http://www.facebook.com/plugins/like.php?href=http://atlas.incubator.apache.org/atlas-docs&send=false&layout=button_count&show-faces=false&action=like&colorscheme=dark"
scrolling="no" frameborder="0"
style="border:none; width:80px; height:20px; margin-top: 10px;" class="pull-right" ></iframe>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<ul class="nav pull-right"><li style="margin-top: 10px;">
<div class="g-plusone" data-href="http://atlas.incubator.apache.org/atlas-docs" data-size="medium" width="60px" align="right" ></div>
</li></ul>
</div>
</div>
</div>
</div>
<div class="container">
<div id="banner">
<div class="pull-left">
<a href=".." id="bannerLeft">
<img src="images/atlas-logo.png" alt="Apache Atlas" width="200px" height="45px"/>
</a>
</div>
<div class="pull-right"> <a href="http://incubator.apache.org" id="bannerRight">
<img src="images/apache-incubator-logo.png" alt="Apache Incubator"/>
</a>
</div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class="">
<a href="http://www.apache.org" class="externalLink" title="Apache">
Apache</a>
</li>
<li class="divider ">/</li>
<li class="">
<a href="index.html" title="Atlas">
Atlas</a>
</li>
<li class="divider ">/</li>
<li class="">Tools required to build and run Apache Atlas on Eclipse</li>
<li id="publishDate" class="pull-right">Last Published: 2017-03-16</li> <li class="divider pull-right">|</li>
<li id="projectVersion" class="pull-right">Version: 0.8-incubating</li>
</ul>
</div>
<div id="bodyColumn" >
<div class="section">
<h2><a name="Tools_required_to_build_and_run_Apache_Atlas_on_Eclipse"></a>Tools required to build and run Apache Atlas on Eclipse</h2>
<p>These instructions are provided as-is. They worked at a point in time; other variants of software may work. These instructions may become stale if the build dependencies change.</p>
<p>They have been shown to work on 19th of December 2016.</p>
<p>To build, run tests, and debug Apache Atlas, the following software is required:</p>
<p><b>Java</b></p>
<ul>
<li>Download and install a 1.8 Java SDK</li>
<li>Set JAVA_HOME system environment variable to the installed JDK home directory</li>
<li>Add JAVA_HOME/bin directory to system PATH</li></ul><b>Python</b>
<p>Atlas command line tools are written in Python.</p>
<ul>
<li>Download and install Python version 2.7.7</li>
<li>For Mac, we used 2.7.11</li>
<li>Add Python home directory to system PATH</li></ul><b>Maven</b>
<ul>
<li>Download and install Maven 3.3.9</li>
<li>Set the environment variable M2_HOME to point to the maven install directory</li>
<li>Add M2_HOME/bin directory to system PATH e.g. C:\Users\IBM_ADMIN\Documents\Software\apache-maven-3.3.9\bin</li></ul><b>Git</b>
<ul>
<li>Install Git</li>
<li>Add git bin directory to the system PATH e.g. C:\Program Files (x86)\Git\bin</li></ul><b>Eclipse</b>
<ul>
<li>Install Eclipse Neon (4.6)</li>
<li>The non-EE Neon for iOS from eclipse.org has been proven to work here.</li>
<li>Install the Scala IDE, TestNG, and m2eclipse-scala features/plugins as described below.</li></ul><b>Scala IDE Eclipse feature</b>
<p>Some of the Atlas source code is written in the Scala programming language. The Scala IDE feature is required to compile Scala source code in Eclipse.</p>
<ul>
<li>In Eclipse, choose Help - Install New Software..</li>
<li>Click Add... to add an update site, and set Location to <a class="externalLink" href="http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site">http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site</a></li>
<li>Select Scala IDE for Eclipse from the list of available features</li>
<li>Restart Eclipse after install</li>
<li>Set the Scala compiler to target the 1.7 JVM: Window - Preferences - Scala - Compiler, change target to 1.7</li></ul><b>TestNG Eclipse plug-in</b>
<p>Atlas tests use the <a class="externalLink" href="http://testng.org/doc/documentation-main.html">TestNG framework</a>, which is similar to JUnit. The TestNG plug-in is required to run TestNG tests from Eclipse.</p>
<ul>
<li>In Eclipse, choose Help - Install New Software..</li>
<li>Click Add... to add an update site, and set Location to <a class="externalLink" href="http://beust.com/eclipse-old/eclipse_6.9.9.201510270734">http://beust.com/eclipse-old/eclipse_6.9.9.201510270734</a>
<ul>
<li>Choose TestNG and continue with install</li>
<li>Restart Eclipse after installing the plugin</li>
<li>In Window - Preferences - TestNG, <b>un</b>check &quot;Use project TestNG jar&quot;</li></ul></li></ul><b>m2eclipse-scala Eclipse plugin</b>
<ul>
<li>In Eclipse, choose Help - Install New Software..</li>
<li>Click Add... to add an update site, and set Location to <a class="externalLink" href="http://alchim31.free.fr/m2e-scala/update-site/">http://alchim31.free.fr/m2e-scala/update-site/</a></li>
<li>Choose Maven Integration for Scala IDE, and continue with install</li>
<li>Restart Eclipse after install</li>
<li>In Window - Preferences -Maven - Errors/Warnings, set Plugin execution not covered by lifecycle configuration to Warning</li></ul><b>Import Atlas maven projects into Eclipse:</b>
<p>a. File - Import - Maven - Existing Maven Projects b. Browse to your Atlas folder c. Uncheck the root project and non-Java projects such as dashboardv2, docs and distro, then click Finish</p>
<p>On the Mac, the Maven import fails with message</p>
<div class="source">
<pre>
&quot;Cannot complete the install because one or more required items could not be found. Software being installed: Maven Integration for AJDT (Optional) 0.14.0.201506231302 (org.maven.ide.eclipse.ajdt.feature.feature.group 0.14.0.201506231302) Missing requirement: Maven Integration for AJDT (Optional) 0.14.0.201506231302 (org.maven.ide.eclipse.ajdt.feature.feature.group 0.14.0.201506231302) requires 'org.eclipse.ajdt.core 1.5.0' but it could not be found&quot;.
</pre></div>
<p>Install <a class="externalLink" href="http://download.eclipse.org/tools/ajdt/46/dev/update">http://download.eclipse.org/tools/ajdt/46/dev/update</a> and rerun. The Maven AspectJ should plugin install - allowing the references to Aspects in Maven to be resolved.</p>
<p>d. In the atlas-typesystem, atlas-repository, hdfs-model, and storm-bridge projects, add the src/main/scala and src/test/scala (if available) directories as source folders. Note: the hdfs-model and storm-bridge projects do not have the src/test/scala folder.</p>
<p>Right-click on the project, and choose <b>Properties</b>.</p>
<p>Click the <b>Java Build Path</b> in the left-hand panel, and choose the <b>Source</b> tab.</p>
<p>Click <b>Add Folder</b>, and select the src/main/scala and src/test/scala directories.</p>
<p>Only the atlas-repository and atlas-type system projects have Scala source folders to update.</p>
<p>e. Select atlas-typesystem, atlas-repository, hdfs-model, and storm-bridge projects, right-click, go to the Scala menu, and choose &#x2018;Set the Scala Installation&#x2019;.</p>
<p>f. Choose Fixed Scala Installation: 2.11.8 (bundled) , and click OK.</p>
<p>g. Restart Eclipse</p>
<p>h. Choose Project - Clean, select Clean all projects, and click OK.</p>
<p>Some projects may not pick up the Scala library &#x2013; if this occurs, quick fix on those projects to add in the Scala library &#x2013; projects atlas-typesystem, atlas-repository, hdfs-model, storm-bridge and altas-webapp.</p>
<p>You should now have a clean workspace.</p>
<p><b>Sample Bash scripts to help mac users</b></p>
<p>You will need to change some of these scripts to point to your installation targets.</p>
<ul>
<li>Run this script to setup your command line build environment</li></ul>
<div class="source">
<pre>
#!/bin/bash # export JAVA_HOME=/Library/Java/JavaVirtualMachines/macosxx6480sr3fp10hybrid-20160719_01-sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
export M2_HOME=/Applications/apache-maven-3.3.9 # Git is installed in the system path
export PYTHON_HOME='/Applications/Python 2.7'
export PATH=$PYTHON_HOME:$M2_HOME/bin:$JAVA_HOME/bin:$PATH
export MAVEN_OPTS=&quot;-Xmx1536m -Drat.numUnapprovedLicenses=100 -XX:MaxPermSize=256m&quot;
</pre></div>
<p></p>
<ul>
<li>If you do not want to set Java 8 as your system java, you can use this bash script to setup the environment and run Eclipse (which you can drop in Applications and rename to neon).</li></ul>
<div class="source">
<pre>
#!/bin/bash
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
export M2_HOME=/Applications/apache-maven-3.3.9
# Git is installed in the system path
export PYTHON_HOME='/Applications/Python 2.7'
export PATH=$PYTHON_HOME:$M2_HOME/bin:$JAVA_HOME/bin:$PATH/Applications/neon.app/Contents/MacOS/eclipse
</pre></div></div>
</div>
</div>
<hr/>
<footer>
<div class="container">
<div class="row span12">Copyright &copy; 2015-2017
<a href="http://www.apache.org">Apache Software Foundation</a>.
All Rights Reserved.
</div>
<p id="poweredBy" class="pull-right">
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
</a>
</p>
</div>
</footer>
</body>
</html>