| <?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.bigtop</groupId> |
| <artifactId>bigtop</artifactId> |
| <version>0.5.0</version> |
| <relativePath>../../../pom.xml</relativePath> |
| </parent> |
| |
| <groupId>org.apache.bigtop.itest</groupId> |
| <artifactId>stacks-common</artifactId> |
| <packaging>pom</packaging> |
| <version>0.5.0</version> |
| <name>stacks-validation-common</name> |
| |
| <properties> |
| <!-- |
| Top-level POM file for Hadoop stack testing collects together a number of |
| common functionality, dependencies, |
| Most of the defaults can be overwritten in sub-modules if so desired. |
| --> |
| <!-- |
| Making sure that we have proper variables needed for Hadoop testing |
| These settings should be enforced at the top level |
| --> |
| <HADOOP_HOME>${env.HADOOP_HOME}</HADOOP_HOME> |
| <HADOOP_CONF_DIR>${env.HADOOP_CONF_DIR}</HADOOP_CONF_DIR> |
| <!-- |
| Default exclude mask for failsafe plugin. OPTIONAL |
| Default value is set below to represent non-existent name |
| If a module needs to exclude certain test patterns this property has to be overwritten |
| --> |
| |
| <org.apache.maven-failsafe-plugin.testExclude>null</org.apache.maven-failsafe-plugin.testExclude> |
| <!-- |
| Default include mask for failsafe plugin. OPTIONAL |
| Default value is set below |
| If a module needs to run different set of tests this property has to be overwritten |
| --> |
| |
| <org.apache.maven-failsafe-plugin.testInclude>**/Test*</org.apache.maven-failsafe-plugin.testInclude> |
| <!-- |
| destination folder where all temp. files will be copied for further processing, REQUIRED |
| Should be defined in a sub-module |
| --> |
| <org.codehaus.groovy.maven.destination>${project.build.testOutputDirectory}</org.codehaus.groovy.maven.destination> |
| <!-- |
| test artifact jar name to be processes e.g. data unpacking, etc, REQUIRED |
| Should be defined in a sub-module |
| --> |
| <org.codehaus.groovy.maven.jar></org.codehaus.groovy.maven.jar> |
| <!-- |
| groupId of test artifact which contains jar files, REQUIRED |
| Should be defined in a sub-module |
| --> |
| <org.apache.maven-dependency-plugin.groupId></org.apache.maven-dependency-plugin.groupId> |
| <!-- |
| artifactId of test artifact which contains jar files, REQUIRED |
| Should be defined in a sub-module |
| --> |
| <org.apache.maven-dependency-plugin.artifactId></org.apache.maven-dependency-plugin.artifactId> |
| <!-- |
| version of test artifact which contains jar files, REQUIRED |
| Should be defined in a sub-module |
| --> |
| <org.apache.maven-dependency-plugin.version></org.apache.maven-dependency-plugin.version> |
| <!-- |
| pattern of resources inside of test artifact to be unpacked in 'unpack' |
| phase |
| --> |
| <org.apache.maven-dependency-plugin.pattern></org.apache.maven-dependency-plugin.pattern> |
| <!-- |
| target folder where all temp. files will be unpacked, OPTIONAL |
| Default value is set below |
| --> |
| <org.apache.maven-dependency-plugin.output>${project.build.directory}</org.apache.maven-dependency-plugin.output> |
| <!-- |
| Type of artifact containing test classes. Default is test-jar |
| This equals to classifier="tests" |
| --> |
| <org.apache.maven-dependency-plugin.type>test-jar</org.apache.maven-dependency-plugin.type> |
| </properties> |
| |
| <scm> |
| <connection>scm:svn:https://svn.apache.org/repos/asf/incubator/bigtop/</connection> |
| </scm> |
| |
| <dependencyManagement> |
| <dependencies> |
| <!-- Gmaven plugin enables a lot of runtime flexibility for us --> |
| <dependency> |
| <groupId>org.codehaus.groovy.maven.runtime</groupId> |
| <artifactId>gmaven-runtime-1.6</artifactId> |
| <version>1.0</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.bigtop.itest</groupId> |
| <artifactId>itest-common</artifactId> |
| <version>0.5.0</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <dependencies> |
| <!-- Turn them on for all children --> |
| <!-- Gmaven plugin enables a lot of runtime flexibility for us --> |
| <dependency> |
| <groupId>org.codehaus.groovy.maven.runtime</groupId> |
| <artifactId>gmaven-runtime-1.6</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <!-- The following plugins must be enabled inside modules in order to work --> |
| <pluginManagement> |
| <plugins> |
| <!--Let's skip unit tests all together for there are none--> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <version>2.11</version> |
| <configuration> |
| <skip>true</skip> |
| </configuration> |
| </plugin> |
| |
| <!-- Copy the test artifacts so it is easier to deal with it--> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-testartifact-jar</id> |
| <phase>generate-test-resources</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>${org.apache.maven-dependency-plugin.groupId}</groupId> |
| <artifactId>${org.apache.maven-dependency-plugin.artifactId}</artifactId> |
| <version>${org.apache.maven-dependency-plugin.version}</version> |
| <type>${org.apache.maven-dependency-plugin.type}</type> |
| <outputDirectory>${org.apache.maven-dependency-plugin.output}</outputDirectory> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| <execution> |
| <id>unpack-testartifact-jar</id> |
| <phase>generate-test-resources</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>${org.apache.maven-dependency-plugin.groupId}</groupId> |
| <artifactId>${org.apache.maven-dependency-plugin.artifactId}</artifactId> |
| <version>${org.apache.maven-dependency-plugin.version}</version> |
| <type>${org.apache.maven-dependency-plugin.type}</type> |
| <outputDirectory>${project.build.directory}</outputDirectory> |
| <includes>${org.apache.maven-dependency-plugin.pattern}</includes> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- This is were actual preparation is started --> |
| <plugin> |
| <groupId>org.codehaus.groovy.maven</groupId> |
| <artifactId>gmaven-plugin</artifactId> |
| <version>1.0</version> |
| <executions> |
| <execution> |
| <id>check-testslist</id> |
| <phase>pre-integration-test</phase> |
| <goals> |
| <goal>execute</goal> |
| </goals> |
| <configuration> |
| <source><![CDATA[ |
| import org.apache.bigtop.itest.* |
| |
| def nm = project.properties['org.apache.maven-dependency-plugin.artifactId']; |
| def vers = project.properties['org.apache.maven-dependency-plugin.version']; |
| def trgt = project.build.directory; |
| |
| def src = project.properties['org.codehaus.groovy.maven.jar'] ?: |
| "${trgt}/${nm}-${vers}.jar"; |
| def prefix = project.properties['org.codehaus.groovy.maven.destination']; |
| |
| try { |
| JarContent.listContent(src).each { |
| TestListUtils.touchTestFiles(prefix, it); |
| }; |
| } catch (Throwable ex) { |
| println "[WARNING] No test classes were found inside of: ${src}"; |
| } |
| ]]> |
| </source> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <version>1.0</version> |
| <executions> |
| <execution> |
| <id>enforce-property</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireProperty> |
| <property>HADOOP_CONF_DIR</property> |
| <message>HADOOP_CONF_DIR env. variable has to be set</message> |
| </requireProperty> |
| <requireProperty> |
| <property>HADOOP_HOME</property> |
| <message>HADOOP_HOME env. variable has to be set</message> |
| </requireProperty> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-failsafe-plugin</artifactId> |
| <version>2.11</version> |
| <configuration> |
| <includes> |
| <include>${org.apache.maven-failsafe-plugin.testInclude}</include> |
| </includes> |
| <excludes> |
| <exclude>${org.apache.maven-failsafe-plugin.testExclude}</exclude> |
| </excludes> |
| <workingDirectory>${project.build.directory}</workingDirectory> |
| <systemPropertyVariables> |
| <HADOOP_HOME>${HADOOP_HOME}</HADOOP_HOME> |
| <log4j.configuration>org.apache.bigtop.itest.log4j.configuration</log4j.configuration> |
| <org.apache.bigtop.itest.log4j.level>INFO</org.apache.bigtop.itest.log4j.level> |
| </systemPropertyVariables> |
| <additionalClasspathElements> |
| <additionalClasspathElement>${HADOOP_CONF_DIR}</additionalClasspathElement> |
| <org.apache.bigtop.itest.JUnitUtils.results.dir>${project.build.directory}/failsafe-reports</org.apache.bigtop.itest.JUnitUtils.results.dir> |
| </additionalClasspathElements> |
| </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> |
| |
| </plugins> |
| </pluginManagement> |
| </build> |
| </project> |