{"id":6297,"date":"2013-12-20T04:55:36","date_gmt":"2013-12-20T12:55:36","guid":{"rendered":"http:\/\/localhost\/exoblog\/?p=6297"},"modified":"2013-12-20T04:55:36","modified_gmt":"2013-12-20T12:55:36","slug":"boost-platform-new-add-ons-manager","status":"publish","type":"post","link":"https:\/\/www.exoplatform.com\/blog\/boost-platform-new-add-ons-manager\/","title":{"rendered":"Boost Your Platform with the New eXo Add-ons Manager"},"content":{"rendered":"<p><strong>Ho, Ho, Ho, eXo Tribe!!!<\/strong><\/p>\n<p>Isn\u2019t it the season to give gifts to your beloved friends and family? I\u2019m not Santa Claus but I will give you a gift for Xmas, which I hope you\u2019ll enjoy.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-6298\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07.png\" alt=\"01-image07\" width=\"100\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07.png 288w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07-35x35.png 35w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07-228x236.png 228w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07-127x131.png 127w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07-87x90.png 87w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/01-image07-29x30.png 29w\" sizes=\"(max-width: 288px) 100vw, 288px\" \/><\/a><\/p>\n<p>In Platform 4.0 we introduced a basic extensions manager, the extension [sh|bat] script, which can be used to install and uninstall various extensions provided by your platform distribution (CRaSH, eXo IDE, &#8230;).<\/p>\n<p>At the end of November, while we were traveling with <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/fdrouet\" target=\"_blank\" rel=\"noopener\">Fr\u00e9d\u00e9ric<\/a> and <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/patrice_lamarque\" target=\"_blank\" rel=\"noopener\">Patrice<\/a> from France to our eXo office in Vietnam, we thought about how to improve this feature to ease the sharing of the many <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/add-ons\" target=\"_blank\" rel=\"noopener\">add-ons<\/a>, contributed by you, our community.<\/p>\n<p>After a few days of work, I developed a prototype, which I\u2019ve just released as version 1.0.0-alpha-2 (thanks to <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/fdrouet\" target=\"_blank\" rel=\"noopener\">Fr\u00e9d\u00e9ric<\/a> for the <a href=\"https:\/\/github.com\/exoplatform\/addons-manager\" target=\"_blank\" rel=\"noopener\">bug report<\/a> for version 1.0.0-alpha-1). There are still many things outstanding, but if you like it like us, you may see it in a future version of Platform.<\/p>\n<p><strong> Let\u2019s take a tour&#8230;<\/strong><\/p>\n<p><!--more--><\/p>\n<h2>Prerequisites<\/h2>\n<p>The add-on manager requires Platform 4+ and at the moment I\u2019m testing it with various combinations of environments from Platform 4.0.1 to the latest 4.1.0, which is in development:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/02-image06.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6299\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/02-image06.png\" alt=\"02-image06\" width=\"650\"><\/a><\/p>\n<h2>Installation<\/h2>\n<p>To install the add-on manager, just download it and extract the content of the archive into your Platform installation directory. This will add to the root two new scripts (<span class=\"navCode\">addon.sh<\/span> and <span class=\"navCode\">addon.bat<\/span>) and a new directory <span class=\"navCode\">addons<\/span> containing a jar (<span class=\"navCode\">addons-manager.jar<\/span>).<\/p>\n<p>To validate your installation, on Windows just launch the script <span class=\"navCode\">addon.bat<\/span> or <span class=\"navCode\">addon.sh<\/span> on other systems. Use the option <span class=\"navCode\">&#8211;help<\/span> to display the help messages of the command line program.<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --help<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/03-image03.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6300\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/03-image03.png\" alt=\"03-image03\" width=\"650\"><\/a><\/p>\n<p>For this article, I\u2019ll use Platform 4.0.3 community edition on Mac OS (and so I\u2019ll use the addon.sh script).<\/p>\n<h2>List available add-ons<\/h2>\n<p>The main goal of this new add-on manager is to make it easier to install add-ons into your platform. We will start by listing all of the available add-ons<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --list<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6301\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01.png\" alt=\"04-image01\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01.png 1110w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-300x178.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-1024x607.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-768x455.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-720x427.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-500x296.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-360x213.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-200x119.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-100x59.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/04-image01-51x30.png 51w\" sizes=\"(max-width: 1110px) 100vw, 1110px\" \/><\/a><\/p>\n<p>We have referenced various known extensions in an index and the program displays them. Using this <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/create-addon\" target=\"_blank\" rel=\"noopener\">form<\/a>, you can ask to <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/patrice_lamarque\" target=\"_blank\" rel=\"noopener\">Patrice<\/a> to reference a new add-on or a new version of an existing add-on.<\/p>\n<p>We also reference development versions (snapshots) of add-ons but we don\u2019t propose them by default as they may be unstable. To display them, just add the option <span class=\"navCode\">&#8211;snapshots<\/span><\/p>\n<pre class=\"lang:default decode:true \">addon.sh --list --snapshots<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6302\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09.png\" alt=\"05-image09\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09.png 1086w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-300x228.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-1024x779.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-768x584.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-622x473.png 622w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-431x328.png 431w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-310x236.png 310w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-172x131.png 172w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-100x76.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/05-image09-39x30.png 39w\" sizes=\"(max-width: 1086px) 100vw, 1086px\" \/><\/a><\/p>\n<p><b> Install an add-on<\/b><b><\/b><\/p>\n<p>To install the latest released version of the <a href=\"https:\/\/www.exoplatform.com\/blog\/team-collaboration-video-conferencing-in-exo-chat-and-why-you-can-drop-skype-now\/\">awesome chat add-on<\/a>, for example, we just call:<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --install exo-chat-extension<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6303\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04.png\" alt=\"06-image04\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04.png 973w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-300x125.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-768x319.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-720x299.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-500x208.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-360x149.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-200x83.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-100x42.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/06-image04-70x30.png 70w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/a><\/p>\n<p>To install the latest version of an add-on including development versions we call:<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --install exo-chat-extension --snapshots<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/07-image05.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6304\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/07-image05.png\" alt=\"07-image05\" width=\"650\"><\/a><\/p>\n<p>Oh right ! By default, we don\u2019t want you to overwrite an existing version without a warning. Let\u2019s enforce it with the option <span class=\"navCode\">&#8211;force<\/span><\/p>\n<pre class=\"lang:default decode:true \">addon.sh --install exo-chat-extension --snapshots --force<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6305\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08.png\" alt=\"08-image08\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08.png 972w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-300x165.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-768x423.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-720x396.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-500x275.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-360x198.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-200x110.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-100x55.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/08-image08-55x30.png 55w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<p>We just replaced version 0.8.0 by the development version 0.8.1-SNAPSHOT.<\/p>\n<p>Let\u2019s now reinstall a specific version (0.8.0-beta1) using the syntax <span class=\"navCode\">addonId:addonVersion<\/span><\/p>\n<pre class=\"lang:default decode:true \">addon.sh --install exo-chat-extension:0.8.0-beta1 --force<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6306\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10.png\" alt=\"09-image10\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10.png 974w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-300x165.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-768x423.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-720x396.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-500x275.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-360x198.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-200x110.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-100x55.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/09-image10-55x30.png 55w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/a><\/p>\n<h2>Uninstall an add-on<\/h2>\n<p>To uninstall an add-on we just call:<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --uninstall exo-chat-extension<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6307\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02.png\" alt=\"10-image02\" width=\"650\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02.png 972w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-300x112.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-768x287.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-720x269.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-500x187.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-360x134.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-200x75.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-100x37.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/10-image02-70x26.png 70w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<h2>How can I reference my own add-ons?<\/h2>\n<p>While you are developing an add-on or if you just don\u2019t want to reference it in the global index, you can attach you own list of add-ons to the Platform.<\/p>\n<p>Let\u2019s imagine I\u2019m working on the <a href=\"https:\/\/github.com\/exo-addons\/staging-extension\" target=\"_blank\" rel=\"noopener\">staging-extension<\/a> add-on, and I\u2019m deploying it in my local repository with Apache Maven.<\/p>\n<p>To install it using the add-on manager, I just have to create a file <span class=\"navCode\">$PLATFORM_HOME\/addons\/list.json (NOTE 2014\/12\/02 :&nbsp;$PLATFORM_HOME\/addons\/local.json in add ons manager 1.0.0+)<\/span> with this minimal content:<\/p>\n<pre class=\"lang:default decode:true \">[\n {\n   \"id\": \"exo-staging-extension\",\n   \"version\": \"2.3.0-SNAPSHOT\",\n   \"name\": \"Staging Extension\",\n   \"description\": \"allows to stage your content before deploying it into production\",\n   \"downloadUrl\": \"file:\/\/..\/..\/.m2\/repository\/org\/exoplatform\/addons\/staging\/staging-extension-packaging-extension\/2.3.0-SNAPSHOT\/staging-extension-packaging-extension-2.3.0-SNAPSHOT.zip\",\n   \"vendor\": \"eXo platform\",\n   \"license\": \"LGPLv3\",\n   \"supportedDistributions\": [\"community\",\"enterprise\"],\n   \"supportedApplicationServers\": [\"tomcat\",\"jboss\"]\n }\n]\n<\/pre>\n<p>And then I can install it with:<\/p>\n<pre class=\"lang:default decode:true \">addon.sh --install exo-staging-extension:2.3.0-SNAPSHOT --force<\/pre>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/11-image00.png\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-6308\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/12\/11-image00.png\" alt=\"11-image00\" width=\"650\"><\/a><\/p>\n<p>Take care, because at the moment the download URL only supports a relative path from the add-on directory of your Platform installation.<\/p>\n<p>For now, an add-on archive is just a zip file with all the jar and war files required by your add-on. The script automatically copies them to wherever necessary.<\/p>\n<h2>What\u2019s next?<\/h2>\n<p><a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/fdrouet\" target=\"_blank\" rel=\"noopener\">Fr\u00e9d\u00e9ric<\/a> is trying to summarize all the requirements in a <a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/wiki\/group\/spaces\/platform_41\/Add-ons_Manager\" target=\"_blank\" rel=\"noopener\">specification<\/a>. Don\u2019t hesitate to give us your feedback and to comment it. We are all ears.<\/p>\n<p>If you encounter any issues with the current version, don\u2019t hesitate to report them in the <a href=\"https:\/\/github.com\/exoplatform\/addons-manager\/issues\" target=\"_blank\" rel=\"noopener\">tracker<\/a>. If you want to contribute, don\u2019t hesitate to have a look at the <a href=\"https:\/\/github.com\/exoplatform\/addons-manager\" target=\"_blank\" rel=\"noopener\">code<\/a>. There is a README to explain how to build and test the project. I\u2019ll review with pleasure all <a href=\"https:\/\/github.com\/exoplatform\/addons-manager\/pulls\" target=\"_blank\" rel=\"noopener\">pull requests<\/a>.<\/p>\n<p>I wish you a Merry Xmas!<\/p>\n<p><a href=\"https:\/\/community.exoplatform.com\/portal\/intranet\/profile\/aheritier\" target=\"_blank\" rel=\"noopener\">Arnaud<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Ho, Ho, Ho, eXo Tribe!!! Isn\u2019t it the season to give gifts to your beloved friends and family? I\u2019m not Santa Claus but I will give you a gift for Xmas, which I hope you\u2019ll enjoy. In Platform 4.0 we introduced a basic extensions manager, the extension [sh|bat] script, which can be used to install [&hellip;]","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[699],"tags":[],"lang":"en","translations":{"en":6297},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/6297"}],"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=6297"}],"version-history":[{"count":0,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/6297\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media?parent=6297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/categories?post=6297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/tags?post=6297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}