<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Developing an Alfresco AMP against a specific Aikau version in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/developing-an-alfresco-amp-against-a-specific-aikau-version/m-p/156799#M111026</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;If you're developing an Alfresco extension that works against Share, you'll probably find that using Aikau streamlines the process. That's exactly what we're doing in the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.alfresco.com/products/records-management" rel="nofollow noopener noreferrer"&gt;Records Management&lt;/A&gt;&lt;SPAN&gt; (or RM) team.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;RM is the largest Alfresco extension developed by in-house Alfresco engineers, so it proves a good testing ground for extension methods.&amp;nbsp;We've found Aikau helps a lot with Share extensions: the latest release makes use of it in &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/records-management/tree/master/rm-share/source/web/js/alfresco/rm" rel="nofollow noopener noreferrer"&gt;some areas&lt;/A&gt;&lt;SPAN&gt; and&amp;nbsp;we're looking to extend its use for the next release.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now that Aikau is a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/Aikau" rel="nofollow noopener noreferrer"&gt;separate project&lt;/A&gt;&lt;SPAN&gt; with an aggressive (weekly) &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/Aikau/blob/master/aikau/src/main/ReleaseNotes.md" rel="nofollow noopener noreferrer"&gt;release cycle&lt;/A&gt;&lt;SPAN&gt; it would be quite easy to miss out on the latest features and bug fixes if an Alfresco add on was dependent upon the version of Aikau that was bundled with Alfresco, luckily it's very easy to specify a newer version for your AMP to use.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The Aikau team have committed to ensuring that their releases are backwards compatible from this point (Alfresco 5.0.1) onwards (and have &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/Aikau/wiki/Unit-Testing" rel="nofollow noopener noreferrer"&gt;tests&lt;/A&gt;&lt;SPAN&gt; to verify it), so we don't need to worry about breaking Share by upgrading the Aikau lib.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As of 5.0.1, Aikau is defined as an external dependency within the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/community-edition/blob/master/projects/slingshot/pom.xml#L209" rel="nofollow noopener noreferrer"&gt;Share pom.xml&lt;/A&gt;&lt;SPAN&gt;. It then ends up as a &lt;/SPAN&gt;&lt;EM&gt;JAR&lt;/EM&gt;&lt;SPAN&gt; in the &lt;/SPAN&gt;&lt;EM&gt;WEB-INF/libs&lt;/EM&gt;&lt;SPAN&gt; directory of the&lt;/SPAN&gt;&lt;EM&gt; share.war&lt;/EM&gt;&lt;SPAN&gt;, so that's where our &lt;/SPAN&gt;&lt;EM&gt;AMP&lt;/EM&gt;&lt;SPAN&gt; needs to place the newer version.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Step one of the process for including a newer version of Aikau is to update the dependency&amp;nbsp;within&amp;nbsp;our &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/records-management/commit/f950a35a04747d826773755288baa1a3bb2bb9a5" rel="nofollow noopener noreferrer"&gt;project's pom.xml&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;groupId&amp;gt;org.alfresco&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;aikau&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;1.0.5&amp;lt;/version&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- Exclude Aikau's dependency from the AMP --&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclusions&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclusion&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/exclusion&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/exclusions&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note: you need to make sure that&amp;nbsp;the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/plugins/alfresco-maven-plugin/plugin-info.html" rel="nofollow noopener noreferrer"&gt;alfresco-maven-plugin&lt;/A&gt;&lt;SPAN&gt; you use to generate the &lt;/SPAN&gt;&lt;EM&gt;AMP&lt;/EM&gt;&lt;SPAN&gt; is configured to &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://artifacts.alfresco.com/nexus/content/groups/public/alfresco-lifecycle-aggregator/latest/plugins/alfresco-maven-plugin/amp-mojo.html#includeDependencies" rel="nofollow noopener noreferrer"&gt;includeDependencies&lt;/A&gt;&lt;SPAN&gt;, as we want to ensure that the Aikau &lt;/SPAN&gt;&lt;EM&gt;JAR&lt;/EM&gt;&lt;SPAN&gt; ends up in the &lt;/SPAN&gt;&lt;EM&gt;libs&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;directory of the &lt;/SPAN&gt;&lt;EM&gt;AMP&lt;/EM&gt;&lt;SPAN&gt; and therefore in the &lt;/SPAN&gt;&lt;EM&gt;WEB-INF/libs&lt;/EM&gt;&lt;SPAN&gt; directory of the Share war when installed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's it,&amp;nbsp;there is no step two. All the configuration is cleverly&amp;nbsp;handled by an &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://github.com/Alfresco/Aikau/blob/master/aikau/src/main/resources/extension-module/aikau-extension.xml" rel="nofollow noopener noreferrer"&gt;extension module&lt;/A&gt;&lt;SPAN&gt; that Aikau supplies&amp;nbsp;(which assumes that you've got &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://docs.alfresco.com/5.0/concepts/dev-extensions-share-module-autodeploy.html" rel="nofollow noopener noreferrer"&gt;auto-deploy&lt;/A&gt;&lt;SPAN&gt; turned on - if not you'll need to &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://docs.alfresco.com/5.0/concepts/dev-extensions-share-module-deployment.html" rel="nofollow noopener noreferrer"&gt;manually enable&lt;/A&gt;&lt;SPAN&gt; this extension module). If you've got multiple&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;AMPs&lt;/EM&gt;&lt;SPAN&gt; that require different versions of Aikau, then the&amp;nbsp;one with the highest version number wins out (due to the &lt;/SPAN&gt;&lt;EM&gt;auto-deploy-index&lt;/EM&gt;&lt;SPAN&gt; in the extension module).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To check which Aikau version is present inside a running Share instance, either:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Load up a page and check the &lt;EM&gt;window.&lt;A class="jive-link-external-small" href="http://dojotoolkit.org/documentation/tutorials/1.9/dojo_config/" rel="nofollow noopener noreferrer"&gt;dojoConfig&lt;/A&gt;&lt;/EM&gt; JS object, the packages object contains a list of all defined &lt;EM&gt;AMD&lt;/EM&gt; package roots&amp;nbsp;- the location for the &lt;EM&gt;alfresco/&lt;/EM&gt;&amp;nbsp;package contains the path to the &lt;EM&gt;JAR&lt;/EM&gt; (located within the &lt;EM&gt;WEB-INF/lib/&lt;/EM&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/api/core/v3/attachments/12243/data" rel="nofollow noopener noreferrer"&gt;&lt;IMG alt="window.dojoConfig" class="image-1 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/9593_dojoConfig.png" style="height: auto;" /&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;Check the module deployment page to verify that the Aikau extension for your overridden Aikau version has been applied&lt;BR /&gt;&lt;IMG alt="module deployment page" class="image-2 jive-image j-img-original" src="https://connect.hyland.com/legacyfs/online/alfresco/9594_deployed-modules.png" style="height: auto;" /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2015 15:00:23 GMT</pubDate>
    <dc:creator>davidcognite</dc:creator>
    <dc:date>2015-02-18T15:00:23Z</dc:date>
    <item>
      <title>Developing an Alfresco AMP against a specific Aikau version</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/developing-an-alfresco-amp-against-a-specific-aikau-version/m-p/156799#M111026</link>
      <description>If you're developing an Alfresco extension that works against Share, you'll probably find that using Aikau streamlines the process. That's exactly what we're doing in the Records Management (or RM) team.RM is the largest Alfresco extension developed by in-house Alfresco engineers, so it proves a goo</description>
      <pubDate>Wed, 18 Feb 2015 15:00:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/developing-an-alfresco-amp-against-a-specific-aikau-version/m-p/156799#M111026</guid>
      <dc:creator>davidcognite</dc:creator>
      <dc:date>2015-02-18T15:00:23Z</dc:date>
    </item>
  </channel>
</rss>

