<?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 Re: Maven building a jar,  not an AMP in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118484#M32668</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/20164"&gt;@mangar&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad you got it resolved &amp;amp; thanks for accepting the solution - that's helpful to other users.&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2021 10:41:32 GMT</pubDate>
    <dc:creator>EddieMay</dc:creator>
    <dc:date>2021-02-15T10:41:32Z</dc:date>
    <item>
      <title>Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118480#M32664</link>
      <description>&lt;P&gt;I am using alfresco 6.2 community.&amp;nbsp; I used the AIO archtype.&amp;nbsp; But when I "mvn clean install -DskipTests"&amp;nbsp;&amp;nbsp; All I get is a .jar file in the target directory,&amp;nbsp; not an AMP.&amp;nbsp;&amp;nbsp; How do I fix this?&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;
    &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
    &amp;lt;artifactId&amp;gt;eisenhour-alfresco-extensions&amp;lt;/artifactId&amp;gt;
    &amp;lt;name&amp;gt;Alfresco Platform/Repository JAR Module&amp;lt;/name&amp;gt;
    &amp;lt;description&amp;gt;Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 4.0
    &amp;lt;/description&amp;gt;

    &amp;lt;parent&amp;gt;
        &amp;lt;groupId&amp;gt;com.elpsolutions&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;alfresco&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;
    &amp;lt;/parent&amp;gt;

    &amp;lt;properties&amp;gt;
    &amp;lt;/properties&amp;gt;

    &amp;lt;dependencies&amp;gt;
        &amp;lt;!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --&amp;gt;
        &amp;lt;dependency&amp;gt;
            &amp;lt;groupId&amp;gt;org.postgresql&amp;lt;/groupId&amp;gt;
            &amp;lt;artifactId&amp;gt;postgresql&amp;lt;/artifactId&amp;gt;
            &amp;lt;version&amp;gt;42.2.18&amp;lt;/version&amp;gt;
        &amp;lt;/dependency&amp;gt;
    &amp;lt;/dependencies&amp;gt;

    &amp;lt;build&amp;gt;
        &amp;lt;plugins&amp;gt;
            &amp;lt;plugin&amp;gt;
                &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;
            &amp;lt;/plugin&amp;gt;
        &amp;lt;/plugins&amp;gt;
    &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Feb 2021 01:05:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118480#M32664</guid>
      <dc:creator>mangar</dc:creator>
      <dc:date>2021-02-13T01:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118481#M32665</link>
      <description>&lt;P&gt;By default jar based extensions are built. In order to get amps along with jars, you need to uncomment the "&lt;STRONG&gt;maven-assembly-plugin&lt;/STRONG&gt;" plugin. Take a look at the parent&amp;nbsp;&lt;A href="https://github.com/Alfresco/alfresco-sdk/blob/master/archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml#L130" target="_blank" rel="noopener nofollow noreferrer"&gt;pom.xml&lt;/A&gt; in your project and find the below given plug-in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example for your reference:&amp;nbsp;&lt;A href="https://github.com/abhinavmishra14/alfresco-mimetype-blocker/blob/master/pom.xml#L125" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/abhinavmishra14/alfresco-mimetype-blocker/blob/master/pom.xml#L125&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;              &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;2.6&amp;lt;/version&amp;gt;
                    &amp;lt;executions&amp;gt;
                        &amp;lt;execution&amp;gt;
                            &amp;lt;id&amp;gt;build-amp-file&amp;lt;/id&amp;gt;
                            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                            &amp;lt;goals&amp;gt;
                                &amp;lt;goal&amp;gt;single&amp;lt;/goal&amp;gt;
                            &amp;lt;/goals&amp;gt;
                            &amp;lt;configuration&amp;gt;
                                &amp;lt;appendAssemblyId&amp;gt;false&amp;lt;/appendAssemblyId&amp;gt;
                                &amp;lt;descriptor&amp;gt;src/main/assembly/amp.xml&amp;lt;/descriptor&amp;gt;
                            &amp;lt;/configuration&amp;gt;
                        &amp;lt;/execution&amp;gt;
                    &amp;lt;/executions&amp;gt;
                    &amp;lt;dependencies&amp;gt;
                        &amp;lt;dependency&amp;gt;
                            &amp;lt;groupId&amp;gt;org.alfresco.maven.plugin&amp;lt;/groupId&amp;gt;
                            &amp;lt;artifactId&amp;gt;alfresco-maven-plugin&amp;lt;/artifactId&amp;gt;
                            &amp;lt;version&amp;gt;${alfresco.sdk.version}&amp;lt;/version&amp;gt;
                        &amp;lt;/dependency&amp;gt;
                    &amp;lt;/dependencies&amp;gt;
               &amp;lt;/plugin&amp;gt;&lt;/PRE&gt;
&lt;P&gt;When using any external or different amp module in your project you need to add the dependency with following:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;exclusions&amp;gt;
       &amp;lt;exclusion&amp;gt;
         &amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;
       &amp;lt;/exclusion&amp;gt;
 &amp;lt;/exclusions&amp;gt;&lt;/PRE&gt;
&lt;P&gt;You can find a note in the platform-docker and share-docker projects about this. Example of adding an amp based dependency, note the &lt;STRONG&gt;exclusions part.&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;               &amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;de.fmaul&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;javascript-console-repo&amp;lt;/artifactId&amp;gt;
			&amp;lt;type&amp;gt;amp&amp;lt;/type&amp;gt;
			&amp;lt;version&amp;gt;0.6&amp;lt;/version&amp;gt;
			&lt;STRONG&gt;&amp;lt;exclusions&amp;gt;
				&amp;lt;exclusion&amp;gt;
					&amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;
					&amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;
				&amp;lt;/exclusion&amp;gt;
			&amp;lt;/exclusions&amp;gt;&lt;/STRONG&gt;
             &amp;lt;/dependency&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Feb 2021 16:39:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118481#M32665</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-02-13T16:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118482#M32666</link>
      <description>&lt;P&gt;Ahh,&amp;nbsp; so obvious,&amp;nbsp; the PARENT pom.&amp;nbsp; I was just building the alfresco-platform.&amp;nbsp; But you are saying that if I add the exclusions to say alfresco-share, It would create an AMP?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 03:20:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118482#M32666</guid>
      <dc:creator>mangar</dc:creator>
      <dc:date>2021-02-14T03:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118483#M32667</link>
      <description>&lt;P&gt;Uncommenting the &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;maven-assembly-plugin&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&amp;nbsp;would start creating amps along with jars as well. Even if you build alfresco-platform sub-project, and if &lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;maven-assembly-plugin&lt;/STRONG&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&amp;nbsp;is enabled, you would get jar and amp both for that sub-project.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 15:28:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118483#M32667</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2021-02-14T15:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118484#M32668</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/20164"&gt;@mangar&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Glad you got it resolved &amp;amp; thanks for accepting the solution - that's helpful to other users.&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 10:41:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118484#M32668</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-02-15T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Maven building a jar,  not an AMP</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118485#M32669</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;SPAN&gt;Abhinav!&lt;BR /&gt;1) Can you explain please why it is required to add &lt;STRONG&gt;&amp;lt;exclusions&amp;gt;&lt;/STRONG&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;exclusions&amp;gt;
       &amp;lt;exclusion&amp;gt;
         &amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;
       &amp;lt;/exclusion&amp;gt;
 &amp;lt;/exclusions&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;What is it required for?&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;It is really not obvious - I tried with and without and did not notice any difference.&lt;BR /&gt;&lt;BR /&gt;2) Also pom contains comment:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If using amp extensions only, add &amp;lt;includeTypes&amp;gt;amp&amp;lt;/includeTypes&amp;gt; to the "collect-extensions" execution below.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Can you explain also this - in what cases it is used?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 16:35:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/maven-building-a-jar-not-an-amp/m-p/118485#M32669</guid>
      <dc:creator>maksym</dc:creator>
      <dc:date>2023-07-10T16:35:16Z</dc:date>
    </item>
  </channel>
</rss>

