<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-wcmqs</artifactId>
    <name>Alfresco WCMQS AMP</name>
    <parent>
        <artifactId>alfresco-wcmqs-parent</artifactId>
        <groupId>org.alfresco</groupId>
        <version>7.0.1.3</version>
    </parent>
    <packaging>amp</packaging>

    <dependencies>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-remote-api</artifactId>
            <version>${dependency.alfresco-community-repo.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${dependency.alfresco-community-repo.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
			<version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
			<version>1.10.19</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${dependency.spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.chemistry</groupId>
            <artifactId>chemistry-tck-atompub</artifactId>
            <version>0.1-incubating-unreleased</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
            <version>${dependency.webscripts.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${dependency.alfresco-community-repo.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-remote-api</artifactId>
            <version>${dependency.alfresco-community-repo.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
    <!--    <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
		-->
    </dependencies>

    <build>
        <resources>

            <!-- need to filter the module.properties file only -->	
		    <resource>
                 <directory>src/main/amp</directory>
                 <targetPath>../${project.build.finalName}</targetPath>
                <filtering>true</filtering>
                <includes>
                    <include>module.properties</include>
                </includes>
             </resource>
            <resource>
                <directory>src/main/amp</directory>
                <targetPath>../${project.build.finalName}</targetPath>
                <filtering>false</filtering>
                <excludes>
                    <exclude>module.properties</exclude>
                </excludes>
            </resource>
         </resources>
 
         <plugins>

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

            <!-- Extract test resources, because they need to be seen as files, not in a jar -->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>extract-quick-resource-files</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.alfresco</groupId>
                            <artifactId>alfresco-repository</artifactId>
                            <version>${dependency.alfresco-community-repo.version}</version>
                            <classifier>tests</classifier>
                        </artifactItem>
                    </artifactItems>
                    <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                    <includes>quick/*</includes>
                </configuration>
            </plugin>
			
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Filter failing tests. None of them is run in the Ant build: who knows if they work? -->
                    <excludes>
                        <exclude>**/DeleteArticleTest.*</exclude>
                        <exclude>**/PublishTest.*</exclude>
                        <exclude>**/RenditionTest.*</exclude>
                        <exclude>**/TemporaryMultilingualAspectTest.*</exclude>
                        <exclude>**/WebSiteRandomGeneratorTest.*</exclude>
                        <exclude>**/WebRootModelTest.*</exclude>
                        <exclude>**/WebscriptTest.*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
