blob: 548683116078681dcc5750ca11cc1b6c4e8babfa [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<title>Setting up an IDE · Eclipse Kapua™ Developer Guide</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="HonKit 3.6.20">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-hints/plugin-hints.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="prev" href="running.html" />
</head>
<body>
<div class="book honkit-cloak">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" data-path="building.html">
<a href="building.html">
Building
</a>
<ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="building.html">
<a href="building.html#kapua">
Kapua
</a>
</li>
<li class="chapter " data-level="1.2.2" data-path="building.html">
<a href="building.html#documentation">
Documentation
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.3" data-path="running.html">
<a href="running.html">
Running
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="running.html">
<a href="running.html#docker-containers">
Docker
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="running.html">
<a href="running.html#openshift">
OpenShift
</a>
</li>
<li class="chapter " data-level="1.3.3" data-path="running.html">
<a href="running.html#vagrant">
Vagrant
</a>
</li>
</ul>
</li>
<li class="chapter active" data-level="1.4" data-path="ide.html">
<a href="ide.html">
Setting up an IDE
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="ide.html">
<a href="ide.html#eclipse">
Eclipse IDE
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" >
<span>
Configuration
</span>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="sso.html">
<a href="sso.html">
Single sign-on
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="database.html">
<a href="database.html">
Working with database
</a>
</li>
<li class="chapter " data-level="1.7" data-path="client.html">
<a href="client.html">
Client generation
</a>
</li>
<li class="chapter " data-level="1.8" data-path="qa.html">
<a href="qa.html">
QA process
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://github.com/honkit/honkit" target="blank" class="gitbook-link">
Published with HonKit
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Setting up an IDE</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="ide-support">IDE support</h1>
<p>Kapua uses a standard Maven setup for building. So it should be possible to
work on Kapua with any IDE.</p>
<p>The following sections describe ways to set up different IDEs to work best with Kapua.</p>
<h2 id="eclipse---manual-setup">Eclipse - manual setup</h2>
<p>As a pre-requisite you will need:</p>
<ul>
<li>Java 8 with the JDK installed on your local machine</li>
<li>A working internet connection</li>
</ul>
<p>The following steps have to be performed</p>
<h3 id="download-and-install-the-eclipse-ide">Download and install the Eclipse IDE</h3>
<p>The Eclipse IDE can be either downloaded as a package from
<a href="https://www.eclipse.org/downloads/eclipse-packages/" target="_blank">https://www.eclipse.org/downloads/eclipse-packages/</a> or it can
be installed using the Eclipse Installer.</p>
<p><div class="alert alert-info hints-alert"><div class="hints-icon"><i class="fa fa-info-circle"></i></div><div class="hints-container"><p>As of now the current version of Eclipse is &quot;Neon&quot;. It should be
possible to use future versions of Eclipse in the same way, but
this guide focuses on &quot;Eclipse Neon.3&quot;.</p>
</div></div></p>
<p>Either way you will have the possibility to choose which edition of the
Eclipse IDE you would like. While it is possible to extend any edition
of Eclipse with additional plugins to feature the same functionality, it
is recommended to start with the &quot;Eclipse IDE for Java EE Developers&quot; as it
already contains most plugins supporting the development already.</p>
<p><img src="images/ide/eclipse_ide_001_installer.png" alt="Screenshot of Eclipse Installer" title="Select Java EE Developer"></p>
<p>After the Eclipse IDE has been installed or extracted (depending on
the method of installation) start it up with a new, empty workspace.</p>
<p>If you already have a working Eclipse IDE installation it is also possible
to re-use this. You can run the same instance with multiple workspaces.</p>
<h3 id="install-additional-plugins">Install additional plugins</h3>
<p>There is a set of plugins for the Eclipse IDE which help in the development
process. And while they are not required, it is recommended to install them
in order to simplify the development process.</p>
<p>Those plugins have to be installed <strong>before</strong> importing the source code into the
Eclipse workspace, as they won&apos;t get activated properly for each project otherwise.</p>
<p>Kapua uses a plain Maven setup and this does not make use of checked in project
configurations. However the Maven integration of Eclipse can detect settings from
Maven plugins and configure Eclipse to behave in the same way, re-using the Maven
configuration. But for this to work, it is best to install extension plugins
before the initial import of the Kapua source code into the workspace.</p>
<p>Some of the following plugins can be installed from the
<a href="https://marketplace.eclipse.org/" target="_blank">Eclipse Marketplace</a> or, when viewing this
documentation as HTML, by dragging the install buttons below directly onto the
Eclipse IDE window:</p>
<p><img src="images/ide/eclipse_ide_002_marketplace.png" alt="Screenshot if Eclipse Marketplace"> </p>
<dl>
<dt>EclEmma</dt>
<dl>
<p>EclEmma is a plugin that can analyze code coverage when running unit tests.</p>
<p><a href="http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=264" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="https://marketplace.eclipse.org/sites/all/themes/solstice/public/images/marketplace/btn-install.png" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
<dl>
<dt>Eclipse Checkstyle Plugin</dt>
<dl>
<p>Kapua uses checkstyle during the build to ensure that some common pitfalls are detected during the build. This plugin
will show those errors already in the IDE once the file is saved.</p>
<p><a href="http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=150" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="https://marketplace.eclipse.org/sites/all/themes/solstice/public/images/marketplace/btn-install.png" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
<dl>
<dt>YEdit</dt>
<dl>
<p>
YEdit is a YAML editor for Eclipse. It can help to edit the different YAML files which Kapua uses.
</p>
<p><a href="http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=949" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="https://marketplace.eclipse.org/sites/all/themes/solstice/public/images/marketplace/btn-install.png" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
<dl>
</dl>
<h3 id="check-out-from-github">Check out from GitHub</h3>
<p>Eclipse Kapua is hosted in the GitHub repository <a href="https://github.com/eclipse/kapua" target="_blank">eclipse/kapua</a>. There are different
ways to clone repositories from GitHub (HTTPS, SSH, direct, forked) the following sections assume that you are
cloning a direct copy using HTTPS. For this the URL is <code>https://github.com/eclipse/kapua.git</code>.</p>
<p>Switch to the Eclipse Git perspective and create a new clone from the URL above. Use the <code>develop</code> branch for
the most recent development.</p>
<p><img src="images/ide/eclipse_ide_003_clone_git.png" alt="Screenshot of git clone dialog" title="Clone from Git"> </p>
<h3 id="importing-projects">Importing projects</h3>
<p>After the repository has been cloned switch back to the &quot;Java EE&quot; perspective, right click in the
empty &quot;Project Explorer&quot; view and select &quot;Import…&quot;.</p>
<p><img src="images/ide/eclipse_ide_004_import_1.png" alt="Screenshot of the common import dialog"></p>
<p>Browse to the location where you cloned the Git repository to and select the directory.</p>
<p><img src="images/ide/eclipse_ide_005_import_2.png" alt="Screenshot of the maven import dialog"></p>
<p>The actual import process may take a few minutes as required artifacts
will be downloaded from Maven Central and the Eurotech Maven repository.</p>
<p>Finally a dialog might ask you to install additional Maven connectors, allow it to install necessary/missing
connectors so that they are available in the Eclipse IDE and configuring the newly imported projects.
This process may ask you to restart the Eclipse IDE instance. In this case answer &quot;yes&quot;, the import
process will continue after the restart. Be sure to give the process a bit of time after the restart.</p>
<p><img src="images/ide/eclipse_ide_006_m2e_install.png" alt="Screesnhot of M2E connector install dialog"></p>
<h3 id="initial-build">Initial build</h3>
<p>In order to fix errors on the <code>kapua-console</code> project you will need
to run a full build on the project. Right click on the <code>kapua</code> project
and select &quot;Run as&quot; -&gt; &quot;Maven build…&quot;. In the following dialog enable the
checkbox to skip tests and press &quot;Run&quot;.</p>
<p><img src="images/ide/eclipse_ide_007_mvn_run.png" alt="Screenshot of Maven launch configuration"></p>
<p>The initial build will take again a few minutes. Afterwards refresh the
<code>kapua-console</code> project (e.g. by selecting and pressing &quot;F5&quot;).</p>
<p>Add the <code>target/generated-sources/gwt</code> to the build path of the
project:</p>
<p><img src="images/ide/eclipse_ide_008_add_gensrc.png" alt="Screenshot of adding source code to the build"></p>
</dl></dl></dl></dl></dl></dl>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="running.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Running">
<i class="fa fa-angle-left"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Setting up an IDE","level":"1.4","depth":1,"next":{"title":"Configuration","level":"1.5","depth":1,"ref":"","articles":[{"title":"Single sign-on","level":"1.5.1","depth":2,"path":"sso.md","ref":"sso.md","articles":[]}]},"previous":{"title":"Running","level":"1.3","depth":1,"path":"running.md","ref":"running.md","articles":[{"title":"Docker","level":"1.3.1","depth":2,"anchor":"#docker-containers","path":"running.md","ref":"running.md#docker-containers","articles":[]},{"title":"OpenShift","level":"1.3.2","depth":2,"anchor":"#openshift","path":"running.md","ref":"running.md#openshift","articles":[]},{"title":"Vagrant","level":"1.3.3","depth":2,"anchor":"#vagrant","path":"running.md","ref":"running.md#vagrant","articles":[]}]},"dir":"ltr"},"config":{"plugins":["hints"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"hints":{"info":"fa fa-info-circle","tip":"fa fa-mortar-board","danger":"fa fa-exclamation-circle","working":"fa fa-wrench"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"eclipse/kapua","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56},"embedFonts":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Eclipse Kapua™ Developer Guide","links":{"home":"http://eclipse.org/kapua"},"gitbook":"3.x.x","description":"Eclipse Kapua™ Developer Guide"},"file":{"path":"ide.md","mtime":"2021-07-20T08:57:45.177Z","type":"markdown"},"gitbook":{"version":"3.6.20","time":"2021-07-20T08:58:19.688Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<noscript>
<style>
.honkit-cloak {
display: block !important;
}
</style>
</noscript>
<script>
// Restore sidebar state as critical path for prevent layout shift
function __init__getSidebarState(defaultValue){
var baseKey = "";
var key = baseKey + ":sidebar";
try {
var value = localStorage[key];
if (value === undefined) {
return defaultValue;
}
var parsed = JSON.parse(value);
return parsed == null ? defaultValue : parsed;
} catch (e) {
return defaultValue;
}
}
function __init__restoreLastSidebarState() {
var isMobile = window.matchMedia("(max-width: 600px)").matches;
if (isMobile) {
// Init last state if not mobile
return;
}
var sidebarState = __init__getSidebarState(true);
var book = document.querySelector(".book");
// Show sidebar if it enabled
if (sidebarState && book) {
book.classList.add("without-animation", "with-summary");
}
}
try {
__init__restoreLastSidebarState();
} finally {
var book = document.querySelector(".book");
book.classList.remove("honkit-cloak");
}
</script>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>