Commit 047c0503 authored by maoo's avatar maoo
Browse files

issue #108 fixed; removed outdated README and ROADMAP txt

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@743 04253f4f-3451-0410-a141-5562f1e59037
parent 61b61ccb
Loading
Loading
Loading
Loading
+0 −100
Original line number Diff line number Diff line
***************
What does it do
***************

The alfresco-maven-plugin provides the following features:

* Packages an AMP starting from a simple (and configurable) Maven project folder structure
* Performs AMP to WAR overlay by using the Alfresco Repository ModuleManagementTool and emulating the same process
during Alfresco boostrap


*****
Usage
*****

+ In order to build an AMP file, you must:
----

1. Define your POM as <packaging>amp</packaging>

2. Specify a module.properties file in the src/main/amp folder, containing the following properties:
module.id=${project.artifactId}
module.title=${project.name}
module.description=${project.description}
module.version=${project.version}
As you can see, the file is filtered with Maven project placeholders

3. Declare the alfresco-maven-plugin in your POM build section

    <build>
        <plugins>
            <plugin>
                <groupId>org.alfresco.maven.plugin</groupId>
                <artifactId>alfresco-maven-plugin</artifactId>
                <version>0.7-SNAPSHOT</version>
            </plugin>
        </plugins>
        ...
    </build>

Always keep in mind the default project-to-AMP mapping:
* src/main/amp => /
* src/main/resources => /lib/amp-classes.jar
* src/main/java      => /lib/amp-classes.kar


+ In order to overlay an existing Alfresco WAR file, you'll need the following elements:
----

1. Define the type of Alfresco WAR you want to overlay: share or alfresco

  <properties>
    <alfresco.client.war>share</alfresco.client.war>
  </properties>

2. Define the following build behaviour

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-alfresco</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
              <artifactItems>
                <artifactItem>
                  <groupId>${alfresco.groupId}</groupId>
                  <artifactId>alfresco</artifactId>
                  <type>war</type>
                  <version>${alfresco.version}</version>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- All artifacts with AMP extensions are unpacked -->
      <!-- using a WAR layout on an empty folder using alfresco-maven-plugin -->
      <plugin>
        <groupId>org.alfresco.maven.plugin</groupId>
        <artifactId>alfresco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>amps-to-war-overlay</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>install</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
 No newline at end of file
+0 −22
Original line number Diff line number Diff line
SHORT TERM (TODO):
* Review of the module.properties version replace. Can't it be just using resource filtering? 
(i.e. a more similar approach to the buildnumber or nosnapshot plugin)
* Review the amp-to-war profile. When ran from an AMP project abuses of
  the project.build.directory/project.build.finalName folder (both AMP and WAR content in there)
* Documentation
* Full release
    - Alfresco POMs
    - Developer & Parent POMs
    - Archetypes
    - Test test test

MID TERM
* Validate module.properties : make sure all properties are there and version is correct; if not, fix it
* Fail if module-context.xml is not present
* Implement <alfresco.version> and <alfresco.edition> configurations; based on that, the alfresco WAR dependency will be
included into the POM at runtime by the add-resources goal
* Test coverage (unit first, use mocking)
* Test AMP install with extensions from addons.alfresco.com
* Release alfresco-maven-plugin (on git - maven-alfresco-archetypes on Google Code)
* Finalize documentation and publish it (wiki.alfresco.com)
* Evaluate running JMeter Maven plugin in order to launch Alfresco test suites