<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>
    <artifactId>alfresco-spp</artifactId>
    <name>Alfresco Sharepoint Protocol</name>
    <packaging>amp</packaging>
    <parent>
        <artifactId>alfresco-parent</artifactId>
        <groupId>org.alfresco</groupId>
        <version>5.0.d</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-remote-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <version>6.1.26</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mortbay.jetty</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${dependency.spring.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>	

    <build>
        <resources>
            <resource>
                <directory>config</directory>
                <excludes>
                    <!-- CLOUD-1790/ALF-18573 Excluding context file from jar - only used in AMP -->
                    <exclude>alfresco/module/org.alfresco.module.vti/module-context.xml</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>config/alfresco/module/org.alfresco.module.vti</directory>
                <includes>
                    <include>module.properties</include>
                </includes>
                <targetPath>../${project.build.finalName}</targetPath>
            </resource>
            <resource>
                <directory>config</directory>
                <includes>
                    <include>alfresco/module/org.alfresco.module.vti/module-context.xml</include>
                </includes>
                <targetPath>../${project.build.finalName}/config</targetPath>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.alfresco.maven.plugin</groupId>
                <artifactId>alfresco-maven-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- exclude integration tests -->
                    <excludes>
                        <exclude>**/AlfrescoMethodHandlerTest.java</exclude>
                        <exclude>**/AlfrescoMeetingServiceHandlerTest.java</exclude>
                        <exclude>**/VtiDocumentHelperTest.java</exclude>
                        <exclude>**/VtiRequestDispatcherTest.java</exclude>
                        <exclude>**/VtiExternalAuthTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>enterprise</id>
            <properties>
                <maven.install.skip>true</maven.install.skip>
                <maven.deploy.skip>true</maven.deploy.skip>
            </properties>
        </profile>

        <!-- integration-tests profile - disabled since these tests fail currently
        <profile>
           <id>integration-tests</id>
           <activation>
               <activeByDefault>false</activeByDefault>
           </activation>
           <dependency>
               <groupId>org.postgresql</groupId>
               <artifactId>postgresql</artifactId>
               <scope>test</scope>
           </dependency>
           <build>
               <plugins>
                   <plugin>
                       <groupId>org.codehaus.mojo</groupId>
                       <artifactId>sql-maven-plugin</artifactId>
                       <executions>
                           <execution>
                               <id>wipe-database</id>
                               <phase>pre-clean</phase>
                               <goals>
                                   <goal>execute</goal>
                               </goals>
                               <configuration>
                                   <sqlCommand>${db.drop.command}</sqlCommand>
                               </configuration>
                           </execution>
                           <execution>
                               <id>create-database</id>
                               <phase>pre-clean</phase>
                               <goals>
                                   <goal>execute</goal>
                               </goals>
                               <configuration>
                                   <sqlCommand>${db.create.command}</sqlCommand>
                               </configuration>
                           </execution>
                       </executions>
                   </plugin>
                   <plugin>
                       <artifactId>maven-surefire-plugin</artifactId>
                       <configuration>
                         <excludes combine.self="override"/>
                       </configuration>
                   </plugin>
               </plugins>
           </build>
        </profile> -->
    </profiles>

</project>
