All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.integration-tests.pom.xml Maven / Gradle / Ivy

Go to download

Archetype for a Tomcat-based project on SAP Cloud Platform (Cloud Foundry).

There is a newer version: 2.28.0
Show newest version
<?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>

    <name>${artifactId} - Integration Tests</name>
    <description>${artifactId} - Integration Tests</description>

    <artifactId>${artifactId}-integration-tests</artifactId>
    <version>${version}</version>

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

    <properties>
        <surefire.skipTests>false</surefire.skipTests>
        <surefire.forkCount>1</surefire.forkCount>
        <surefire.include>*</surefire.include>
        <surefire.exclude/>
        <surefire.groups/>
        <surefire.excludedGroups/>
        <surefire.maxMemorySize>1024m</surefire.maxMemorySize>
        <surefire.logLevel>info</surefire.logLevel>

        <!--
        Use the argLine property to define the arguments for the JVMs that are forked by the surefire plugin.
        This avoids the need to use late property evaluation for configuring the jacoco plugin.
        Relying on late evaluation of properties such as @{argLine} can result in issues with certain IDEs.

        For more details, visit:
        https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html
        -->
        <argLine>-Xmx${surefire.maxMemorySize} -Dorg.slf4j.simpleLogger.defaultLogLevel=${surefire.logLevel}</argLine>

        <jacoco.executionDataFile>${project.build.directory}/coverage-reports/jacoco.exec</jacoco.executionDataFile>
        <jacoco.includes>*</jacoco.includes>
        <jacoco.excludes>org.apache.*</jacoco.excludes>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${groupId}</groupId>
            <artifactId>${artifactId}-application</artifactId>
            <classifier>classes</classifier>
            <version>${version}</version>
            <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-classic</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.sap.cloud.s4hana.cloudplatform</groupId>
            <artifactId>scp-cf</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sap.cloud.s4hana</groupId>
            <artifactId>s4hana-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sap.cloud.s4hana</groupId>
            <artifactId>testutil</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-tomcat-embedded-8</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-catalina</artifactId>
            <version>${tomcat.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-coyote</artifactId>
            <version>${tomcat.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jasper</artifactId>
            <version>${tomcat.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <!--
                    Reserve a random port for Tomcat in Arquillian tests.

                    Background: The Tomcat adapter for Arquillian currently does not support to randomly select
                    an unused port. Therefore, this plugins reserves a random port for running tests.

                    Unfortunately, this approach does not allow to run tests with surefire using a forkCount > 1
                    since this would require to reserve multiple ports.

                    If you want to run tests with parallel forks, you have to either reserve and assign ports
                    explicitly or rely on other Arquillian adapters such as TomEE which supports selecting a
                    random port by specifying the port number "-1" in the arquillian.xml file.
                     -->
                    <execution>
                        <id>reserve-arquillian-port</id>
                        <goals>
                            <goal>reserve-network-port</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <randomPort>true</randomPort>
                            <portNames>
                                <portName>arquillian.httpPort</portName>
                            </portNames>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <configuration>
                    <destFile>${jacoco.executionDataFile}</destFile>
                    <dataFile>${jacoco.executionDataFile}</dataFile>
                    <includes>${jacoco.includes}</includes>
                    <excludes>${jacoco.excludes}</excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M3</version>
                <configuration>
                    <skipTests>${surefire.skipTests}</skipTests>
                    <includes>
                        <include>${surefire.include}</include>
                    </includes>
                    <excludes>
                        <exclude>${surefire.exclude}</exclude>
                    </excludes>
                    <forkCount>${surefire.forkCount}</forkCount>
                    <reuseForks>false</reuseForks>
                    <groups>${surefire.groups}</groups>
                    <excludedGroups>${surefire.excludedGroups}</excludedGroups>
                    <systemPropertyVariables>
                        <arquillian.httpPort>${arquillian.httpPort}</arquillian.httpPort>
                        <surefire.forkDir>${project.build.directory}/surefire-fork/${surefire.forkNumber}/</surefire.forkDir>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy