{"id":11102,"date":"2016-05-26T09:15:42","date_gmt":"2016-05-26T16:15:42","guid":{"rendered":"\/blog\/?p=11102"},"modified":"2016-05-26T09:15:42","modified_gmt":"2016-05-26T16:15:42","slug":"contribute-to-exo-platform-add-ons-in-10-minutes-with-che-and-codenvy","status":"publish","type":"post","link":"https:\/\/www.exoplatform.com\/blog\/contribute-to-exo-platform-add-ons-in-10-minutes-with-che-and-codenvy\/","title":{"rendered":"How to contribute to eXo Platform add-ons in 10 minutes with Che and Codenvy"},"content":{"rendered":"<p>Do you remember that a few months ago if you wanted to contribute to an open-source project, even to fix a minor issue, you had to:<\/p>\n<ul>\n<li>clone the project<\/li>\n<li>read the contribution manual<\/li>\n<li>check your Java version<\/li>\n<li>install the right package manager (Maven, Bower, npm or whatever you needed)<\/li>\n<li>download the right application server, setup your IDE as well<\/li>\n<li>run the init script, find out why it doesn\u2019t work on your laptop, kill any other local applications on the server to fix the conflict \u2026 and so on!<\/li>\n<\/ul>\n<p>It was so boring that in some cases you gave up on your fix because of all the annoying things you had to do.<\/p>\n<p>But wait, this time is over!<br \/>\n<!--more--><\/p>\n<p>In this post, I will show you how to work as a developer on the <strong>eXo Tasks Add-on<\/strong> and how you can quickly contribute to this <strong>open-source project<\/strong> without installing anything on your laptop, thanks to <a href=\"https:\/\/eclipse.org\/che\/\" target=\"_blank\" rel=\"noopener\"><strong>Eclipse Che<\/strong><\/a> and <a href=\"https:\/\/codenvy.com\/\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\"><strong>Codenvy<\/strong><\/a>! (Unless you don\u2019t have a browser \ud83d\ude09 )<\/p>\n<p><strong>Codenvy<\/strong> is based on the <strong>open-source Eclipse Che project<\/strong> and can be extended and customized with <strong>Che plugins<\/strong>.<\/p>\n<p>The eXo Tasks Add-on is a <strong>task management application<\/strong> that allows you to create and organize <strong>tasks in eXo Platform<\/strong>. If you want to know more about it, take a look at these two blog posts:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.exoplatform.com\/blog\/getting-things-done-with-exo-tasks\/\" target=\"_blank\" rel=\"noopener\"><strong>Getting Things Done with eXo Tasks!<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.exoplatform.com\/blog\/better-task-management-is-coming-in-exo-platform\/\" target=\"_blank\" rel=\"noopener\"><strong>Better Task Management is Coming in eXo Platform<\/strong><\/a><\/li>\n<\/ul>\n<h2>Fix a bug in an eXo add-on, then build, install and test your code and create a PR with just \u2026 a browser!<\/h2>\n<p>We are going to fix a very simple issue for the purposes of this demo. As you can see in the animated image below, when you want to edit a task description, you have to click on the dedicated rich editor area, but the focus is not set in the rich editor field.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image04.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-11104\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image04.gif\" alt=\"Fix a bug on a task management\" width=\"1419\" height=\"850\"><\/a><\/p>\n<p>Ok so now let\u2019s fix it!<\/p>\n<h3>Start your developer workspace with one click<\/h3>\n<p>The first step is to go to the <a href=\"https:\/\/github.com\/exoplatform\/task\" target=\"_blank\" rel=\"noopener\"><strong>eXo Task GitHub project<\/strong><\/a> and to click on the { &#x2601; } <strong>Developer Workspace<\/strong> button.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image09.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-11106\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image09.jpg\" alt=\"Task management add-on\" width=\"450\"><\/a><\/p>\n<p>When clicking on the button, it calls a <a href=\"https:\/\/codenvy.io\/docs\/factory\/getting-started\/index.html\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\"><strong>Codenvy Factory<\/strong><\/a>. A Factory is a template used to generate a new developer workspace from a consumer-friendly URL. We created one dedicated for eXo Tasks which allows to <strong>automatically load a ready-to-use development environment<\/strong>.<\/p>\n<p><em>NOTE: You need a Codenvy account to be able to use it. An account is free and you can create one quickly with your GitHub or Google+ accounts, for example.<\/em><\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-11107\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05.jpg\" alt=\"eXo Task Add-on check out from GitHub\" width=\"930\" height=\"570\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05.jpg 930w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-300x184.jpg 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-768x471.jpg 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-720x441.jpg 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-500x306.jpg 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-360x221.jpg 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-200x123.jpg 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-100x61.jpg 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image05-49x30.jpg 49w\" sizes=\"(max-width: 930px) 100vw, 930px\" \/><\/a><\/p>\n<p>When the workspace starts up, the following steps are automatically executed:<\/p>\n<ul>\n<li>The eXo Task Add-on project is <strong>checked out from GitHub<\/strong>.<\/li>\n<li>The project is <strong>configured as a Maven project<\/strong>.<\/li>\n<li>A <strong>custom command<\/strong> named \u201c<em>Task &#8211; Build &amp; Install &amp; Start PLF<\/em>\u201d is executed to build this add-on, install it to the local eXo Platform installation and start an eXo Platform instance.<\/li>\n<\/ul>\n<p>You can follow these processes in the <em>Terminal view<\/em> at the bottom of the screen, where you can also find the link to access your eXo Platform instance with the default username (root) and password (gtn):<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-11108\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00.png\" alt=\"eXo Platform instance\" width=\"775\" height=\"161\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00.png 775w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-300x62.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-768x160.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-720x150.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-500x104.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-360x75.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-200x42.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-100x21.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image00-70x15.png 70w\" sizes=\"(max-width: 775px) 100vw, 775px\" \/><\/a><\/p>\n<p><em>NOTE: Even if the preview URL is there from the beginning, you need to wait until the end of the command to be able to click on it so that your eXo Platform instance is ready to use.<\/em><\/p>\n<h3>A closer look at the commands<\/h3>\n<p>Eclipse Che and Codenvy allow you to create commands associated with your work space. As the <strong>eXo Tasks Add-on<\/strong> is a <strong>Maven project<\/strong>, there are some basic Maven commands available, like \u201c<em>clean package<\/em>\u201d and \u201c<em>clean test<\/em>\u201d.<br \/>\nIn addition, we have created some useful <strong>custom commands<\/strong>:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>eXo PLF &#8211; Start<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Starts the eXo Platform as a background process and displays the logs<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>eXo PLF &#8211; Stop<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Stops the Platform waiting for up to a few seconds for a process to end<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>eXo PLF &#8211; Logs<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Displays the platform.log content file in real time<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>eXo PLF &#8211; Clean<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Cleans up all the data to enable starting with a fresh instance<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><em>Task &#8211; Build &amp; Install<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Builds the eXo Tasks project with Maven and installs it into (or updates it in) the eXo Platform installation with the eXo Add-on Manager.<\/p>\n<ul>\n<li><em>Task &#8211; Build &amp; Install &amp; Start PLF<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Like the previous command, and in addition starts the eXo Platform instance after successful installation of the Add-on<\/p>\n<p>As you can see on the screenshot below, those commands, available via the <em>Run &gt; Commands<\/em> menu, can be easily updated:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image07.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-11109\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image07.png\" alt=\"Useful custom commands on eXo tasks add-on\" width=\"650\"><\/a><\/p>\n<p>These commands are enough to make you efficient in developing eXo Tasks out of the box, but you can also create your own commands. Feel free to create some and share them with us. We will be happy to improve the default commands based on your feedback.<\/p>\n<h3>Fix a bug, and then build, install and test your code on an eXo Platform instance<\/h3>\n<p>Now we are ready to fix the bug:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image061.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-11134\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image061.gif\" alt=\"Fix a bug on eXo Platform instance\" width=\"1419\" height=\"851\"><\/a><\/p>\n<p>Ok, the fix seems to be good, let\u2019s create a pull request \ud83d\ude42<\/p>\n<h3>Create a Pull Request<\/h3>\n<p>To be able to create a pull request on GitHub, you first need to fill in the form on the <em>Committer<\/em> screen via the menu entry <em>Profile &gt; Preferences &gt; Git &gt; Committer<\/em>:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image011.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-11133\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image011.png\" alt=\"Create a Pull Request on Github\" width=\"500\"><\/a><\/p>\n<p>Then, since the Task project has been checked out on the default Git branch (branch develop), you need to create a new branch. Let\u2019s name it \u201cfix\/TA-484\u201d here to follow eXo conventions, because we already have a <a href=\"https:\/\/jira.exoplatform.org\/browse\/TA-484\" target=\"_blank\" rel=\"noopener\"><strong>JIRA opened for this bug<\/strong><\/a>:<\/p>\n<ul>\n<li>Click on the top menu: Git &gt; Branches\u2026.<\/li>\n<li>Then in the dialog box that opens, click on the <em>Create<\/em> button from the default <em>develop<\/em> branch and name your branch:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image021.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-11132\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image021.png\" alt=\"New branch creation on Git branch\" width=\"535\"><\/a><\/p>\n<ul>\n<li>Select your new branch and click on the <em>Checkout<\/em> button.<\/li>\n<li>Finally, add any files that you have updated and commit them to the local Git repository using the <em>Git &gt; Add files<\/em> and <em>Git &gt; Commit menu entries<\/em>.<\/li>\n<\/ul>\n<p>Now you can use the <strong>Pull Request panel<\/strong> on the right of the screen to enter all the details for the pull request you want to create:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image03_2.gif\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-11131\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image03_2.gif\" alt=\"Pull Request panel\" width=\"900\" height=\"540\"><\/a><br \/>\n<em>NOTE: A fork of the project will be created on your GitHub account, so the first time Codenvy needs to access your account, a popup will ask you to validate some GitHub permissions.<\/em><\/p>\n<p>This PR is available <a href=\"https:\/\/github.com\/exo-addons\/task\/pull\/24\" target=\"_blank\" rel=\"noopener\"><strong>here<\/strong><\/a>.<\/p>\n<h2>Share your fix with the Engineering team, the QA team and others!<\/h2>\n<p>Now, that your PR has been created and seems to be ok, all other teams, like the QA Team for example, can easily test your code in the same development environment.<\/p>\n<p>They just have to click on the { &#x2601; } <strong>Developer Workspace button<\/strong> available on the PR description and that\u2019s it!<br \/>\nIndeed, when clicking on this button, it calls another Factory, automatically created by Codenvy with the PR, and loads a ready-to-use environment to help others to review this contribution and test it before accepting the PR.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-11119\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08.png\" alt=\"Another Factory automatically created by Codenvy with the PR\" width=\"1000\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08.png 1527w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-300x168.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-1024x572.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-768x429.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-1250x698.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-720x402.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-500x279.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-360x201.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-200x112.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-100x56.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/05\/image08-54x30.png 54w\" sizes=\"(max-width: 1527px) 100vw, 1527px\" \/><\/a><\/p>\n<p>As you can see, this PR has successfully passed all the eXo checks \u2026 but wait! It\u2019s another subject and we will discuss about the PR Workflow used at eXo in another blog post. Stay tuned!<\/p>\n<style type=\"text\/css\">a:link{text-decoration:none}<\/style>\n<div><a href=\"https:\/\/community.exoplatform.com\/portal\/dw\/\" target=\"_blank\" rel=\"noopener\"><br \/>\n<\/a><\/p>\n<div class=\"adv-events\" style=\"background: #476fad; padding: 30px 20px; color: white;\">\n<div class=\"media\">\n<div class=\"pull-right\"><img decoding=\"async\" class=\"size-full wp-image-6587 alignright\" style=\"border: none; border-radius: 0; box-shadow: none;\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2016\/02\/tribe.png\" alt=\"Join The eXo Tribe\" height=\"120px\"><\/div>\n<div class=\"media-body\">\n<h4 class=\"media-heading\">Join The eXo Tribe<\/h4>\n<p>Register for our Community to Get updates, tutorials, support, and access to the Platform and add-on downloads. <strong>Sign in Now!<\/strong><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"Do you remember that a few months ago if you wanted to contribute to an open-source project, even to fix a minor issue, you had to: clone the project read the contribution manual check your Java version install the right package manager (Maven, Bower, npm or whatever you needed) download the right application server, setup [&hellip;]","protected":false},"author":7,"featured_media":13393,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":[],"categories":[819],"tags":[749,765,737],"lang":"en","translations":{"en":11102},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/11102"}],"collection":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/comments?post=11102"}],"version-history":[{"count":0,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/11102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media\/13393"}],"wp:attachment":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media?parent=11102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/categories?post=11102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/tags?post=11102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}