Commit d2868bdf authored by Martin Bergljung's avatar Martin Bergljung
Browse files

Added integration-tests subproject to AIO, #401

parent 673461b6
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
@@ -96,6 +96,44 @@
                </fileSet>
            </fileSets>
        </module>

        <module id="integration-tests" name="integration-tests" dir="integration-tests">
            <fileSets>
                <fileSet filtered="true" packaged="true" encoding="UTF-8">
                    <directory>src/main/java</directory>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </fileSet>
                <fileSet filtered="true" packaged="true" encoding="UTF-8">
                    <directory>src/test/java</directory>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </fileSet>
                <fileSet encoding="UTF-8" filtered="true">
                    <directory>src/test/resources</directory>
                    <includes>
                        <include>**/dev-log4j.properties</include>
                    </includes>
                </fileSet>
                <fileSet encoding="UTF-8" filtered="false">
                    <directory>src/test/resources</directory>
                    <includes>
                        <include>**</include>
                    </includes>
                    <excludes>
                        <exclude>**/dev-log4j.properties</exclude>
                    </excludes>
                </fileSet>
                <fileSet encoding="UTF-8" filtered="false">
                    <directory>src/test/properties</directory>
                    <includes>
                        <include>**/*.properties</include>
                    </includes>
                </fileSet>
            </fileSets>
        </module>
    </modules>

    <fileSets>
+119 −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>
    <artifactId>${artifactId}</artifactId>
    <name>Integration Tests Module</name>
    <description>Integration Tests module for in-container integration testing - part of AIO - SDK 3</description>
    <packaging>jar</packaging> <!-- Note. this just runs Integration Tests, but it needs to be a JAR otherwise
                                            nothing is compiled (i.e. you cannot set it to pom) -->

    <parent>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}</artifactId>
        <version>${version}</version>
    </parent>

    <properties>
    </properties>

    <dependencies>
        <!-- Bring in any custom module that should be tested, by default we bring in the Platform JAR module
             that is generated for the AIO project -->
        <dependency>
            <groupId>${groupId}</groupId>
            <artifactId>${rootArtifactId}-platform-jar</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <!-- Filter the test resource files in the IT project, and do property substitutions.
                We need this config so this is done before the Alfresco Maven Plugin 'it' is executed. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <inherited>false</inherited>
                <!-- Run only for the AIO parent Project -->
                <executions>
                    <execution>
                        <id>copy-and-filter-test-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                            <resources>
                                <testResource>
                                    <directory>src/test/resources</directory>
                                    <filtering>true</filtering>
                                </testResource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Runs the integration tests, any class that follows naming convention
                 "**/IT*.java", "**/*IT.java", and "**/*ITCase.java" will be considered an integration test -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.19.1</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify-test</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>2.19.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Run Alfresco Tomcat embedded -->
            <plugin>
                <groupId>org.alfresco.maven.plugin</groupId>
                <artifactId>alfresco-maven-plugin</artifactId>
                <version>${alfresco.sdk.version}</version>
                <executions>
                    <execution>
                        <id>start-alfresco</id>
                        <goals>
                            <goal>it</goal>
                        </goals>
                        <phase>pre-integration-test</phase>
                    </execution>
                    <!-- No need to call a shutdown mojo, it shuts down after the tests finishes
                    <execution>
                        <id>stop-alfresco</id>
                        <goals>
                            <goal>shutdown</goal>
                        </goals>
                        <phase>post-integration-test</phase>
                    </execution>
                    -->
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
 No newline at end of file
+0 −0

File moved.

+0 −0

File moved.

+0 −0

File moved.

Loading