Commit 61b61ccb authored by ohej's avatar ohej
Browse files

Initial Share AMP archetype


git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@742 04253f4f-3451-0410-a141-5562f1e59037
parent 2513926a
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.alfresco.maven.archetype</groupId>
  <artifactId>share-amp-archetype</artifactId>

  <packaging>maven-archetype</packaging>
  <name>Share AMP Archetype from Maven Alfresco SDK</name>
  <description>Share project with full support for lifecycle and rapid development of AMPs (Alfresco Module Packages)</description>

  <parent>
    <groupId>org.alfresco.maven</groupId>
    <artifactId>alfresco-lifecycle-aggregator</artifactId>
    <version>1.1.2-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <build>
      <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>archetype-resources/pom.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>archetype-resources/pom.xml</exclude>
            </excludes>
            <filtering>false</filtering>
        </resource>
      </resources>
      <plugins>
        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <useDefaultDelimiters>false</useDefaultDelimiters>
                <delimiters>
                    <delimiter>@@</delimiter>
                </delimiters>
            </configuration>
        </plugin>
      </plugins>
  </build>

</project>
+90 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="quickstart-amp-archetype"
    xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <requiredProperties>
    <requiredProperty key="version">
      <defaultValue>1.0-SNAPSHOT</defaultValue>
    </requiredProperty>
    <requiredProperty key="alfresco_target_groupId">
      <defaultValue>org.alfresco</defaultValue>
    </requiredProperty>
    <requiredProperty key="alfresco_target_version">
      <defaultValue>5.0.a-SNAPSHOT</defaultValue>
    </requiredProperty>
    <requiredProperty key="alfresco_target_amp_client_war">
      <defaultValue>share</defaultValue>
    </requiredProperty>
    <requiredProperty key="alfresco_target_amp_client_war_groupId">
      <defaultValue>org.alfresco</defaultValue>
    </requiredProperty>
    <requiredProperty key="alfresco_target_amp_client_war_version">
      <defaultValue>5.0.a-SNAPSHOT</defaultValue>
    </requiredProperty>
    <requiredProperty key="package">
      <defaultValue>(not used)</defaultValue>
    </requiredProperty>
  </requiredProperties>
  <fileSets>
    <fileSet filtered="true" packaged="false" encoding="UTF-8">
      <directory>src/main/java</directory>
      <includes>
        <include>**/*.java</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>src/main/amp</directory>
      <includes>
        <include>**/*.jsp</include>
        <include>**/*.xml</include>
        <include>**/*.properties</include>
        <include>**/*.txt</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>src/main/resources</directory>
      <includes>
        <include>**/*.xml</include>
      </includes>
    </fileSet>
    <fileSet encoding="UTF-8">
      <directory>src/main/amp</directory>
      <includes>
        <include>**/*.js</include>
        <include>**/*.css</include>
      </includes>
    </fileSet>
    <fileSet filtered="true" encoding="UTF-8">
        <directory>src/main/amp/config/alfresco/module/__artifactId__</directory>
    </fileSet>

    <fileSet filtered="true" encoding="UTF-8">
        <directory>src/main/amp/web</directory>
    </fileSet>
    
    <fileSet filtered="false" packaged="false" encoding="UTF-8">
      <directory>src/test/java</directory>
      <includes>
        <include>**/*.java</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>src/test/resources</directory>
      <includes>
        <include>**/*.properties</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>src/test/properties</directory>
      <includes>
        <include>**/*</include>
      </includes>
    </fileSet>
    <fileSet filtered="false" encoding="UTF-8">
      <directory>tomcat</directory>
      <includes>
        <include>**/*.xml</include>
      </includes>
    </fileSet>
  </fileSets>
</archetype-descriptor>
+109 −0
Original line number Diff line number Diff line
<?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>${groupId}</groupId>
    <artifactId>${artifactId}</artifactId>
    <version>${version}</version>
    <name>${artifactId} AMP project</name>
    <packaging>amp</packaging>
    <description>Manages the lifecycle of the ${artifactId} AMP (Alfresco Module Package)</description>

    <parent>
        <groupId>org.alfresco.maven</groupId>
        <artifactId>alfresco-sdk-parent</artifactId>
        <version>@@alfresco.sdk.parent.version@@</version>
    </parent>

    <!-- 
       | SDK properties have sensible defaults in the SDK parent,
       | but you can override the properties below to use another version. 
       | For more available properties see the alfresco-sdk-parent POM. 
       -->
    <properties>
        <!-- Defines the alfresco edition to compile against. Allowed values are [org.alfresco|org.alfresco.enterprise]--> 
        <alfresco.groupId>${alfresco_target_groupId}</alfresco.groupId>
        <!-- Defines the alfresco version to compile against -->
        <alfresco.version>${alfresco_target_version}</alfresco.version>
        <app.log.root.level>WARN</app.log.root.level>
        <alfresco.data.location>alf_data_dev</alfresco.data.location>
        <!-- Defines the target WAR artifactId to run this amp, only used with the -Pamp-to-war switch
        .    | Allowed values: alfresco | share. Defaults to a repository AMP, but could point to your foundation WAR -->
        <alfresco.client.war>${alfresco_target_amp_client_war}</alfresco.client.war>
        <!-- Defines the target WAR groupId to run this amp, only used with the -Pamp-to-war switch
        .    | Could be org.alfresco | org.alfresco.enterprise or your corporate groupId -->
        <alfresco.client.war.groupId>${alfresco_target_amp_client_war_groupId}</alfresco.client.war.groupId>
        <!-- Defines the target WAR version to run this amp, only used with the -Pamp-to-war switch -->
        <alfresco.client.war.version>${alfresco_target_amp_client_war_version}</alfresco.client.war.version>
        <!-- This controls which properties will be picked in src/test/properties for embedded run -->
        <env>local</env>

        <!-- Tell Tomcat to run on port 8081 since this is a standalone project, and likely Alfresco will have taken port 8080 -->
        <maven.tomcat.port>8081</maven.tomcat.port>
    </properties>

    <!-- Here we realize the connection with the Alfresco selected platform 
        (e.g.version and edition) -->
    <dependencyManagement>
        <dependencies>
            <!-- This will import the dependencyManagement for all artifacts in the selected Alfresco version/edition
                (see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies) 
                NOTE: You still need to define dependencies in your POM, but you can omit version as it's enforced by this dependencyManagement. NOTE: It defaults 
                to the latest version this SDK pom has been tested with, but alfresco version can/should be overridden in your project's pom -->
            <dependency>
                <groupId>${alfresco.groupId}</groupId>
                <artifactId>alfresco-platform-distribution</artifactId>
                <version>${alfresco.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <!-- Following dependencies are needed for compiling Java code in src/main/java; 
         <scope>provided</scope> is inherited for each of the following; 
         for more info, please refer to alfresco-platform-distribution POM -->
    <dependencies>
        <dependency>
            <groupId>${alfresco.groupId}</groupId>
            <artifactId>alfresco-repository</artifactId>
        </dependency>

        <dependency>
          <groupId>org.springframework.extensions.surf</groupId>
          <artifactId>spring-surf-api</artifactId>
          <version>1.2.1-M16</version>
          <scope>provided</scope>
        </dependency>
        
        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- This repository is only needed to retrieve Alfresco parent POM. 
        NOTE: This can be removed when/if Alfresco will be on Maven Central 
        
        NOTE: The repository to be used for Alfresco Enterprise artifacts is
        https://artifacts.alfresco.com/nexus/content/groups/private/. Please check
        with Alfresco Support to get credentials to add to your ~/.m2/settings.xml
        if you are a Enterprise customer or Partner  
        -->
    <repositories>
        <repository>
            <id>alfresco-public</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
        </repository>
        <repository>
            <id>alfresco-public-snapshots</id>
            <url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
</project>
+14 −0
Original line number Diff line number Diff line
# Custom AMP to WAR location mappings

#
# The following property can be used to include the standard set of mappings.
# The contents of this file will override any defaults.  The default is
# 'true', i.e. the default mappings will be augmented or modified by values in
# this file.
#
include.default=true

#
# Custom mappings.  If 'include.default' is false, then this is the complete set.
#
/web=/
+3 −0
Original line number Diff line number Diff line
# Define here logging properties for your AMP specific classes
# This will end up in alfresco.war/WEB-INF/classes/alfresco/module/log4j.properties 
# and loaded as per http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#log4j.properties
Loading