cancel
Showing results for 
Search instead for 
Did you mean: 

Include AMP Dependencies with SDK 2.1

sarah_jordison
Champ in-the-making
Champ in-the-making
Hi Folks,

I am quiet new to maven and the SDK 2.1. Does anyone know a specific way to include external AMPs to my POM? I want to include the js-console (https://github.com/share-extras/js-console) as part of my project for development, but cannot figure out how.

Thanks!
1 REPLY 1

gravitonian
Star Collaborator
Star Collaborator
Hi,

The typical way to go about this is as follows:

1) Check if your AMP is available in artifacts.alfresco.com or for example http://search.maven.org/
2) If it is available in any accessible Nexus maven repo continue to 4, if not 3
3) Download and Install the artifact in your local maven repo (or company nexus server), locally you can do something like:

mvn install:install-file -DgroupId=org.sharextras -DartifactId=javascript-console-repo -Dversion=0.6.0 -Dfile=javascript-console-repo-0.6.0.amp -Dpackaging=amp -DgeneratePom=true
mvn install:install-file -DgroupId=org.sharextras -DartifactId=javascript-console-share -Dversion=0.6.0 -Dfile=javascript-console-share-0.6.0.amp -Dpackaging=amp -DgeneratePom=true

4) See http://docs.alfresco.com/5.0/tasks/alfresco-sdk-advanced-link-alf-amps-aio.html (it shows how to do this for the Records Management module, but it would be the same principle for javascript console)
Use something like this:

pom.xml in all-in-one/repo folder:

<dependency>
<groupId>org.sharextras</groupId>
<artifactId>javascript-console-repo</artifactId>
<version>0.6.0</version>
<type>amp</type>
</dependency>
</dependencies>
<overlays>

<overlay>
<groupId>org.sharextras</groupId>
<artifactId>javascript-console-repo</artifactId>
<type>amp</type>
</overlay>

pom.xml in all-in-one/share folder:

<dependencies>

<dependency>
<groupId>org.sharextras</groupId>
<artifactId>javascript-console-share</artifactId>
<version>0.6.0</version>
<type>amp</type>
</dependency>
</dependencies>
<overlays>

<overlay>
<groupId>org.sharextras</groupId>
<artifactId>javascript-console-share</artifactId>
<type>amp</type>
</overlay>
</overlays>