<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version>
<configuration>
<excludes>
</excludes>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.parent.build.directory}/jacoco.exec</destFile>
<excludes>
<exclude>**/*Test*</exclude>
</excludes>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.parent.build.directory}/jacoco.exec</dataFile>
<outputDirectory>${project.parent.reporting.outputDirectory}/jacoco</outputDirectory>
</configuration>
</execution>
<execution>
<id>prepare-agent-integration</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<destFile>${project.parent.build.directory}/jacoco-it.exec</destFile>
<excludes>
<exclude>**/*Test*</exclude>
</excludes>
<propertyName>jacoco.agent.itArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-integration-test</id>
<phase>verify</phase>
<goals>
<goal>report-integration</goal>
</goals>
<configuration>
<dataFile>${project.parent.build.directory}/jacoco-it.exec</dataFile>
<outputDirectory>${project.parent.reporting.outputDirectory}/jacoco-it</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<includes>
<include>**/*Test*.class</include>
</includes>
<excludes>
<exclude>**/*IT</exclude>
</excludes>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>${surefireArgLine} -Xmx1024m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin.version}</version>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>${jacoco.agent.itArgLine} -Xmx1024m -XX:MaxPermSize=256m</argLine>
<skipTests>false</skipTests>
<includes>
<include>**/*IT.class</include>
</includes>
<systemPropertyVariables>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<goals>
<goal>set-system-properties</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<properties>
<property>
<name>logs.output</name>
<value>${project.parent.basedir}/Api/target/logs</value>
</property>
<property>
<value>a-sample-api</value>
</property>
<property>
<name>logback.configurationFile</name>
<value>${project.parent.basedir}/Api-bundle/config/logback.xml</value>
</property>
<property>
<name>apibundle.dir</name>
<value>${project.parent.basedir}/Api-bundle</value>
</property>
<property>
<name>lib</name>
<value>${project.parent.basedir}/Api/target/dependency/lib</value>
</property>
<property>
<name>org.apache.cxf.Logger</name>
<value>org.apache.cxf.common.logging.Slf4jLogger</value>
</property>
<property>
<name>org.jboss.logging.provider</name>
<value>slf4j</value>
</property>
<property>
<name>org.eclipse.jetty.annotations.maxWait</name>
<value>120</value>
</property>
<property>
<name>application.properties</name>
<value>${project.parent.basedir}/Api-bundle/config/env/application-integrationtest.properties</value>
</property>
<property>
<name>sensitive.properties</name>
<value>${project.parent.basedir}/Api/src/test/resources/sensitive.properties</value>
</property>
<property>
<name>javax.net.ssl.trustStore</name>
<value>${project.parent.basedir}/Api-bundle/config/env/certs.jks</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<!-- Ensure context xml is set to significantly increase application startup time -->
<contextXml>${project.parent.basedir}/Api/src/main/webapp/WEB-INF/jetty-web.xml</contextXml>
<!--
NOTE: To enable SSL locally make sure you the following line below
${project.parent.basedir}/Api-bundle/config/env/jetty-https_ssl-dev.xml
-->
<jettyXml>${project.parent.basedir}/Api-bundle/config/jetty/jetty.xml,${project.parent.basedir}/Api-bundle/config/env/jetty-http-dev.xml</jettyXml>
<dumpOnStart>true</dumpOnStart>
<scanIntervalSeconds>0</scanIntervalSeconds>
<stopPort>${jetty.stop.port}</stopPort>
<stopKey>${jetty.stop.key}</stopKey>
<stopWait>10</stopWait>
<jvmArgs>${jacoco.agent.itArgLine} -Dlib=${project.parent.basedir}/Api/target/dependency/lib -Dlogback.configurationFile=${project.parent.basedir}/Api-bundle/config/jetty/logback.xml
-Dapplication.properties=${project.parent.basedir}/Api-bundle/config/env/application-integrationtest.properties</jvmArgs>
</configuration>
<dependencies>
<dependency>
<groupId>au.com.company.toolkit</groupId>
<artifactId>company-toolkit-logging-jetty</artifactId>
<version>${toolkit.logging.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-forked</goal>
</goals>
<configuration>
<daemon>true</daemon>
<waitForChild>true</waitForChild>
<maxStartupLines>1000</maxStartupLines>
</configuration>
</execution>
<!-- execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution-->
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
<configuration>
<stopWait>1</stopWait>
<stopPort>${jetty.stop.port}</stopPort>
<stopKey>${jetty.stop.key}</stopKey>
</configuration>
</execution>
</executions>
</plugin>
</plugins>