blob: 548683116078681dcc5750ca11cc1b6c4e8babfa [file] [log] [blame]
<html lang="" >
<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" />
<div class="book honkit-cloak">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
<li class="chapter " data-level="1.2" data-path="building.html">
<a href="building.html">
<ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="building.html">
<a href="building.html#kapua">
<li class="chapter " data-level="1.2.2" data-path="building.html">
<a href="building.html#documentation">
<li class="chapter " data-level="1.3" data-path="running.html">
<a href="running.html">
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="running.html">
<a href="running.html#docker-containers">
<li class="chapter " data-level="1.3.2" data-path="running.html">
<a href="running.html#openshift">
<li class="chapter " data-level="1.3.3" data-path="running.html">
<a href="running.html#vagrant">
<li class="chapter active" data-level="1.4" data-path="ide.html">
<a href="ide.html">
Setting up an IDE
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="ide.html">
<a href="ide.html#eclipse">
Eclipse IDE
<li class="chapter " data-level="1.5" >
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="sso.html">
<a href="sso.html">
Single sign-on
<li class="chapter " data-level="1.6" data-path="database.html">
<a href="database.html">
Working with database
<li class="chapter " data-level="1.7" data-path="client.html">
<a href="client.html">
Client generation
<li class="chapter " data-level="1.8" data-path="qa.html">
<a href="qa.html">
QA process
<li class="divider"></li>
<a href="" target="blank" class="gitbook-link">
Published with HonKit
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Setting up an IDE</a>
<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>
<li>Java 8 with the JDK installed on your local machine</li>
<li>A working internet connection</li>
<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="" target="_blank"></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>
<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="" 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>
<p>EclEmma is a plugin that can analyze code coverage when running unit tests.</p>
<p><a href="" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
<dt>Eclipse Checkstyle Plugin</dt>
<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="" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
YEdit is a YAML editor for Eclipse. It can help to edit the different YAML files which Kapua uses.
<p><a href="" class="drag" title="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client" target="_blank"><img class="img-responsive" src="" alt="Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client"></a></p>
<h3 id="check-out-from-github">Check out from GitHub</h3>
<p>Eclipse Kapua is hosted in the GitHub repository <a href="" 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></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
<p><img src="images/ide/eclipse_ide_008_add_gensrc.png" alt="Screenshot of adding source code to the build"></p>
<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 class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
<a href="running.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Running">
<i class="fa fa-angle-left"></i>
var gitbook = gitbook || [];
gitbook.push(function() {{"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":"","ref":"","articles":[]}]},"previous":{"title":"Running","level":"1.3","depth":1,"path":"","ref":"","articles":[{"title":"Docker","level":"1.3.1","depth":2,"anchor":"#docker-containers","path":"","ref":"","articles":[]},{"title":"OpenShift","level":"1.3.2","depth":2,"anchor":"#openshift","path":"","ref":"","articles":[]},{"title":"Vagrant","level":"1.3.3","depth":2,"anchor":"#vagrant","path":"","ref":"","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":"","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":"","readme":"","glossary":"","summary":""},"variables":{},"title":"Eclipse Kapua™ Developer Guide","links":{"home":""},"gitbook":"3.x.x","description":"Eclipse Kapua™ Developer Guide"},"file":{"path":"","mtime":"2021-07-20T08:57:45.177Z","type":"markdown"},"gitbook":{"version":"3.6.20","time":"2021-07-20T08:58:19.688Z"},"basePath":".","book":{"language":""}});
.honkit-cloak {
display: block !important;
// 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
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 {
} finally {
var book = document.querySelector(".book");
<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>