| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~ contributor license agreements. See the NOTICE file distributed with |
| ~ this work for additional information regarding copyright ownership. |
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~ (the "License"); you may not use this file except in compliance with |
| ~ the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <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> |
| <parent> |
| <groupId>org.apache.unomi</groupId> |
| <artifactId>unomi-root</artifactId> |
| <version>2.0.0-SNAPSHOT</version> |
| </parent> |
| <artifactId>unomi-itests</artifactId> |
| <name>Apache Unomi :: Integration Tests</name> |
| <description>Apache Unomi Context Server integration tests</description> |
| |
| <dependencyManagement> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.karaf</groupId> |
| <artifactId>karaf-bom</artifactId> |
| <version>${karaf.version}</version> |
| <type>pom</type> |
| <scope>import</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <dependencies> |
| <!-- Provide the KarafTestSupport --> |
| <dependency> |
| <groupId>org.apache.karaf.itests</groupId> |
| <artifactId>common</artifactId> |
| <version>${karaf.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <!-- Define the Apache Karaf version to download and use for the test --> |
| <!-- We use a released version here to avoid SNAPSHOT resolution --> |
| <dependency> |
| <groupId>org.apache.unomi</groupId> |
| <artifactId>unomi</artifactId> |
| <version>${project.version}</version> |
| <type>tar.gz</type> |
| <scope>test</scope> |
| <exclusions> |
| <exclusion> |
| <groupId>org.apache.karaf</groupId> |
| <artifactId>org.apache.karaf.client</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.apache.httpcomponents</groupId> |
| <artifactId>httpclient-osgi</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| <!-- Required to use shell commands in the tests --> |
| <dependency> |
| <groupId>org.apache.karaf.shell</groupId> |
| <artifactId>org.apache.karaf.shell.core</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <!-- Provide the PaxExam Karaf support --> |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-container-karaf</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <!-- Provide the PaxExam JUnit extension --> |
| <dependency> |
| <groupId>org.ops4j.pax.exam</groupId> |
| <artifactId>pax-exam-junit4</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.geronimo.specs</groupId> |
| <artifactId>geronimo-atinject_1.0_spec</artifactId> |
| <version>1.2</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.awaitility</groupId> |
| <artifactId>awaitility</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.servicemix.bundles</groupId> |
| <artifactId>org.apache.servicemix.bundles.hamcrest</artifactId> |
| <version>1.3_1</version> |
| <scope>runtime</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.httpcomponents</groupId> |
| <artifactId>httpclient-osgi</artifactId> |
| <version>4.5.5</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.httpcomponents</groupId> |
| <artifactId>httpcore-osgi</artifactId> |
| <version>4.4.9</version> |
| </dependency> |
| <dependency> |
| <groupId>org.eclipse.jetty.websocket</groupId> |
| <artifactId>websocket-client</artifactId> |
| <version>9.4.28.v20200408</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.unomi</groupId> |
| <artifactId>unomi-lifecycle-watcher</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.unomi</groupId> |
| <artifactId>unomi-persistence-spi</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.unomi</groupId> |
| <artifactId>shell-commands</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.codehaus.groovy</groupId> |
| <artifactId>groovy</artifactId> |
| <version>${groovy.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| </dependencies> |
| |
| <profiles> |
| |
| <profile> |
| <id>run-tests</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>com.googlecode.maven-download-plugin</groupId> |
| <artifactId>download-maven-plugin</artifactId> |
| <version>1.3.0</version> |
| <executions> |
| <execution> |
| <!-- the wget goal actually binds itself to this phase by default --> |
| <phase>pre-integration-test</phase> |
| <goals> |
| <goal>wget</goal> |
| </goals> |
| <configuration> |
| <url> |
| https://search.maven.org/remotecontent?filepath=org/jacoco/jacoco/0.8.8/jacoco-0.8.8.zip |
| </url> |
| <outputFileName>jacoco.zip</outputFileName> |
| <unpack>true</unpack> |
| <outputDirectory>${project.build.directory}/jacoco/</outputDirectory> |
| <failOnError>false</failOnError> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Needed if you use versionAsInProject() --> |
| <plugin> |
| <groupId>org.apache.servicemix.tooling</groupId> |
| <artifactId>depends-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>generate-depends-file</id> |
| <goals> |
| <goal>generate-depends-file</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <version>1.8</version> |
| <executions> |
| <execution> |
| <phase>generate-resources</phase> |
| <configuration> |
| <tasks> |
| <unzip src="${project.basedir}/src/test/resources/migration/snapshots_repository.zip" dest="${project.build.directory}" /> |
| </tasks> |
| </configuration> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>com.github.alexcojocaru</groupId> |
| <artifactId>elasticsearch-maven-plugin</artifactId> |
| <!-- REPLACE THE FOLLOWING WITH THE PLUGIN VERSION YOU NEED --> |
| <version>6.23</version> |
| <configuration> |
| <clusterName>contextElasticSearchITests</clusterName> |
| <transportPort>9500</transportPort> |
| <httpPort>9400</httpPort> |
| <version>${elasticsearch.test.version}</version> |
| <autoCreateIndex>true</autoCreateIndex> |
| <timeout>120</timeout> |
| <environmentVariables> |
| <ES_JAVA_OPTS>-Xms4g -Xmx4g</ES_JAVA_OPTS> |
| </environmentVariables> |
| <instanceSettings> |
| <properties> |
| <path.repo>${project.build.directory}/snapshots_repository</path.repo> |
| <cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled> |
| <http.cors.allow-origin>*</http.cors.allow-origin> |
| <http.cors.allow-methods>OPTIONS,HEAD,GET,POST,PUT,DELETE</http.cors.allow-methods> |
| <http.cors.allow-headers>Authorization,X-Requested-With,X-Auth-Token,Content-Type,Content-Length</http.cors.allow-headers> |
| </properties> |
| </instanceSettings> |
| </configuration> |
| <executions> |
| <!-- |
| The elasticsearch maven plugin goals are by default bound to the |
| pre-integration-test and post-integration-test phases |
| --> |
| <execution> |
| <id>start-elasticsearch</id> |
| <phase>pre-integration-test</phase> |
| <goals> |
| <goal>runforked</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>stop-elasticsearch</id> |
| <phase>post-integration-test</phase> |
| <goals> |
| <goal>stop</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <version>3.0.0-M4</version> |
| <configuration> |
| <includes> |
| <include>**/*AllITs.java</include> |
| </includes> |
| <systemPropertyVariables> |
| <my.system.property>foo</my.system.property> |
| </systemPropertyVariables> |
| </configuration> |
| <executions> |
| <execution> |
| <id>integration-test</id> |
| <goals> |
| <goal>integration-test</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>verify</id> |
| <goals> |
| <goal>verify</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>exec-maven-plugin</artifactId> |
| <groupId>org.codehaus.mojo</groupId> |
| <executions> |
| <execution> |
| <id>Generate code coverage report</id> |
| <phase>verify</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${basedir}/jacoco-report.sh</executable> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>itest-code-coverage</id> |
| <activation> |
| <property> |
| <name>it.code.coverage</name> |
| <value>true</value> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.jacoco</groupId> |
| <artifactId>jacoco-maven-plugin</artifactId> |
| <version>0.7.7.201606060606</version> |
| <executions> |
| <execution> |
| <phase>post-site</phase> |
| <id>report</id> |
| <goals> |
| <goal>report</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |