cancel
Showing results for 
Search instead for 
Did you mean: 

Maven 4 Alfresco

rdanner
Champ in-the-making
Champ in-the-making
At the end of last week we added a Forge Project for Maven Integration with Alfresco.

A plugin is now available that will build an Alfresco AMP file for you in a similar fashion to the way Maven will build a WAR file.  If you're interested, you may download the plug-in here.  http://forge.alfresco.com/frs/download.php/302/alfresco-maven-amp-plugin-1.0.0-RC1.zip

For those not familiar with AMP files, they are the standard way for packaging and deploying custom functionality for Alfresco.  AMP stands for Alfresco Module Package.

This is an example POM file for an AMP project


<?xml version="1.0" encoding="UTF-8"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.alfresco.maven.plugins.test</groupId>
  <artifactId>amp-packaging-test</artifactId>
  <packaging>amp</packaging>
  <name>Maven Alfresco AMP Packaging Type Test</name>
  <version>1.0-0</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.alfresco.maven.plugin</groupId>
        <artifactId>maven-amp-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>

  <dependencies>

     <!– need to list these as a provided so that Maven doesn't download them
          and include them in the AMP, they are provided by the Alfresco application
     –>
 
    <dependency>
      <groupId>alfresco</groupId>
      <artifactId>repository</artifactId>
      <version>2.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.0.2</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>
11 REPLIES 11

mindthegab
Champ in-the-making
Champ in-the-making
Following yesterday's announcement of the official Alfresco Artifact Repository (http://blogs.alfresco.com/wp/its-offici … epository/),
marking this thread as solved as both Alfresco Community and Enterprise artifacts are hosted at http://artifacts.alfresco.com .

Please check:

https://wiki.alfresco.com/wiki/Alfresco_Artifacts_Repository
http://mindthegab.com/2012/06/05/introducing-the-alfresco-artifacts-repository-yes-with-alfresco-ent...

For a Maven ALfresco SDK compatible with these artifacts, please follow the evolution of the Maven Alfresco Lifecycle project at

http://code.google.com/p/maven-alfresco-archetypes/

by joining the dedicated ML at http://groups.google.com/group/maven-alfresco/.

mindthegab
Champ in-the-making
Champ in-the-making