Preparing for Bigtop 0.7.0 release
[bigtop.git] / bigtop-tests / test-execution / common / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
18 <project xmlns="http://maven.apache.org/POM/4.0.0"
19 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
21
22 <modelVersion>4.0.0</modelVersion>
23
24 <parent>
25 <groupId>org.apache.bigtop</groupId>
26 <artifactId>bigtop</artifactId>
27 <version>0.7.0</version>
28 <relativePath>../../../pom.xml</relativePath>
29 </parent>
30
31 <groupId>org.apache.bigtop.itest</groupId>
32 <artifactId>stacks-common</artifactId>
33 <packaging>pom</packaging>
34 <version>0.7.0</version>
35 <name>stacks-validation-common</name>
36
37 <properties>
38 <!--
39 Top-level POM file for Hadoop stack testing collects together a number of
40 common functionality, dependencies,
41 Most of the defaults can be overwritten in sub-modules if so desired.
42 -->
43 <!--
44 Making sure that we have proper variables needed for Hadoop testing
45 These settings should be enforced at the top level
46 -->
47 <HADOOP_HOME>${env.HADOOP_HOME}</HADOOP_HOME>
48 <HADOOP_CONF_DIR>${env.HADOOP_CONF_DIR}</HADOOP_CONF_DIR>
49 <!--
50 Default exclude mask for failsafe plugin. OPTIONAL
51 Default value is set below to represent non-existent name
52 If a module needs to exclude certain test patterns this property has to be overwritten
53 -->
54
55 <org.apache.maven-failsafe-plugin.testExclude>null</org.apache.maven-failsafe-plugin.testExclude>
56 <!--
57 Default include mask for failsafe plugin. OPTIONAL
58 Default value is set below
59 If a module needs to run different set of tests this property has to be overwritten
60 -->
61
62 <org.apache.maven-failsafe-plugin.testInclude>**/Test*</org.apache.maven-failsafe-plugin.testInclude>
63 <!--
64 destination folder where all temp. files will be copied for further processing, REQUIRED
65 Should be defined in a sub-module
66 -->
67 <org.codehaus.groovy.maven.destination>${project.build.testOutputDirectory}</org.codehaus.groovy.maven.destination>
68 <!--
69 test artifact jar name to be processes e.g. data unpacking, etc, REQUIRED
70 Should be defined in a sub-module
71 -->
72 <org.codehaus.groovy.maven.jar></org.codehaus.groovy.maven.jar>
73 <!--
74 groupId of test artifact which contains jar files, REQUIRED
75 Should be defined in a sub-module
76 -->
77 <org.apache.maven-dependency-plugin.groupId></org.apache.maven-dependency-plugin.groupId>
78 <!--
79 artifactId of test artifact which contains jar files, REQUIRED
80 Should be defined in a sub-module
81 -->
82 <org.apache.maven-dependency-plugin.artifactId></org.apache.maven-dependency-plugin.artifactId>
83 <!--
84 version of test artifact which contains jar files, REQUIRED
85 Should be defined in a sub-module
86 -->
87 <org.apache.maven-dependency-plugin.version></org.apache.maven-dependency-plugin.version>
88 <!--
89 pattern of resources inside of test artifact to be unpacked in 'unpack'
90 phase
91 -->
92 <org.apache.maven-dependency-plugin.pattern></org.apache.maven-dependency-plugin.pattern>
93 <!--
94 target folder where all temp. files will be unpacked, OPTIONAL
95 Default value is set below
96 -->
97 <org.apache.maven-dependency-plugin.output>${project.build.directory}</org.apache.maven-dependency-plugin.output>
98 <!--
99 Type of artifact containing test classes. Default is test-jar
100 This equals to classifier="tests"
101 -->
102 <org.apache.maven-dependency-plugin.type>test-jar</org.apache.maven-dependency-plugin.type>
103 </properties>
104
105 <scm>
106 <connection>scm:git:https://git-wip-us.apache.org/repos/asf/bigtop.git</connection>
107 </scm>
108
109 <dependencies>
110 <!-- Turn them on for all children -->
111 <!-- Gmaven plugin enables a lot of runtime flexibility for us -->
112 <dependency>
113 <groupId>org.codehaus.groovy.maven.runtime</groupId>
114 <artifactId>gmaven-runtime-1.6</artifactId>
115 </dependency>
116 </dependencies>
117
118 <build>
119 <!-- The following plugins must be enabled inside modules in order to work -->
120 <pluginManagement>
121 <plugins>
122 <!--Let's skip unit tests all together for there are none-->
123 <plugin>
124 <groupId>org.apache.maven.plugins</groupId>
125 <artifactId>maven-surefire-plugin</artifactId>
126 <version>2.11</version>
127 <configuration>
128 <skip>true</skip>
129 </configuration>
130 </plugin>
131
132 <!-- Copy the test artifacts so it is easier to deal with it-->
133 <plugin>
134 <groupId>org.apache.maven.plugins</groupId>
135 <artifactId>maven-dependency-plugin</artifactId>
136 <executions>
137 <execution>
138 <id>copy-testartifact-jar</id>
139 <phase>generate-test-resources</phase>
140 <goals>
141 <goal>copy</goal>
142 </goals>
143 <configuration>
144 <artifactItems>
145 <artifactItem>
146 <groupId>${org.apache.maven-dependency-plugin.groupId}</groupId>
147 <artifactId>${org.apache.maven-dependency-plugin.artifactId}</artifactId>
148 <version>${org.apache.maven-dependency-plugin.version}</version>
149 <type>${org.apache.maven-dependency-plugin.type}</type>
150 <outputDirectory>${org.apache.maven-dependency-plugin.output}</outputDirectory>
151 </artifactItem>
152 </artifactItems>
153 </configuration>
154 </execution>
155 <execution>
156 <id>unpack-testartifact-jar</id>
157 <phase>generate-test-resources</phase>
158 <goals>
159 <goal>unpack</goal>
160 </goals>
161 <configuration>
162 <artifactItems>
163 <artifactItem>
164 <groupId>${org.apache.maven-dependency-plugin.groupId}</groupId>
165 <artifactId>${org.apache.maven-dependency-plugin.artifactId}</artifactId>
166 <version>${org.apache.maven-dependency-plugin.version}</version>
167 <type>${org.apache.maven-dependency-plugin.type}</type>
168 <outputDirectory>${project.build.directory}</outputDirectory>
169 <includes>${org.apache.maven-dependency-plugin.pattern}</includes>
170 </artifactItem>
171 </artifactItems>
172 </configuration>
173 </execution>
174 </executions>
175 </plugin>
176
177 <!-- This is were actual preparation is started -->
178 <plugin>
179 <groupId>org.codehaus.groovy.maven</groupId>
180 <artifactId>gmaven-plugin</artifactId>
181 <version>1.0</version>
182 <executions>
183 <execution>
184 <id>check-testslist</id>
185 <phase>pre-integration-test</phase>
186 <goals>
187 <goal>execute</goal>
188 </goals>
189 <configuration>
190 <source><![CDATA[
191 import org.apache.bigtop.itest.*
192
193 def nm = project.properties['org.apache.maven-dependency-plugin.artifactId'];
194 def vers = project.properties['org.apache.maven-dependency-plugin.version'];
195 def trgt = project.build.directory;
196
197 def src = project.properties['org.codehaus.groovy.maven.jar'] ?:
198 "${trgt}/${nm}-${vers}.jar";
199 def prefix = project.properties['org.codehaus.groovy.maven.destination'];
200
201 try {
202 JarContent.listContent(src).each {
203 TestListUtils.touchTestFiles(prefix, it);
204 };
205 } catch (Throwable ex) {
206 println "[WARNING] No test classes were found inside of: ${src}";
207 }
208 ]]>
209 </source>
210 </configuration>
211 </execution>
212 </executions>
213 </plugin>
214
215 <plugin>
216 <groupId>org.apache.maven.plugins</groupId>
217 <artifactId>maven-enforcer-plugin</artifactId>
218 <version>1.0</version>
219 <executions>
220 <execution>
221 <id>enforce-property</id>
222 <goals>
223 <goal>enforce</goal>
224 </goals>
225 <configuration>
226 <rules>
227 <requireProperty>
228 <property>HADOOP_CONF_DIR</property>
229 <message>HADOOP_CONF_DIR env. variable has to be set</message>
230 </requireProperty>
231 <requireProperty>
232 <property>HADOOP_HOME</property>
233 <message>HADOOP_HOME env. variable has to be set</message>
234 </requireProperty>
235 </rules>
236 <fail>true</fail>
237 </configuration>
238 </execution>
239 </executions>
240 </plugin>
241
242 <plugin>
243 <groupId>org.apache.maven.plugins</groupId>
244 <artifactId>maven-failsafe-plugin</artifactId>
245 <version>2.11</version>
246 <configuration>
247 <includes>
248 <include>${org.apache.maven-failsafe-plugin.testInclude}</include>
249 </includes>
250 <excludes>
251 <exclude>${org.apache.maven-failsafe-plugin.testExclude}</exclude>
252 </excludes>
253 <workingDirectory>${project.build.directory}</workingDirectory>
254 <systemPropertyVariables>
255 <HADOOP_HOME>${HADOOP_HOME}</HADOOP_HOME>
256 <log4j.configuration>org.apache.bigtop.itest.log4j.configuration</log4j.configuration>
257 <org.apache.bigtop.itest.log4j.level>INFO</org.apache.bigtop.itest.log4j.level>
258 </systemPropertyVariables>
259 <additionalClasspathElements>
260 <additionalClasspathElement>${HADOOP_CONF_DIR}</additionalClasspathElement>
261 <org.apache.bigtop.itest.JUnitUtils.results.dir>${project.build.directory}/failsafe-reports</org.apache.bigtop.itest.JUnitUtils.results.dir>
262 </additionalClasspathElements>
263 </configuration>
264 <executions>
265 <execution>
266 <id>integration-test</id>
267 <goals>
268 <goal>integration-test</goal>
269 </goals>
270 </execution>
271 <execution>
272 <id>verify</id>
273 <goals>
274 <goal>verify</goal>
275 </goals>
276 </execution>
277 </executions>
278 </plugin>
279
280 </plugins>
281 </pluginManagement>
282 </build>
283 </project>