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
|
|
19
|
<!--
|
20
|
NOTE - This POM is used for Cloudera's build and packaging process.
|
21
|
-->
|
22
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
23
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
24
|
<modelVersion>4.0.0</modelVersion>
|
25
|
|
26
|
<parent>
|
27
|
<groupId>com.cloudera.cdh</groupId>
|
28
|
<artifactId>hadoop-root</artifactId>
|
29
|
<version>2.0.0-mr1-cdh4.3.1</version>
|
30
|
<relativePath>cloudera/maven-packaging/pom.xml</relativePath>
|
31
|
</parent>
|
32
|
|
33
|
<groupId>com.cloudera.cdh</groupId>
|
34
|
<artifactId>hadoop-ant</artifactId>
|
35
|
<version>2.0.0-mr1-cdh4.3.1</version>
|
36
|
<packaging>pom</packaging>
|
37
|
|
38
|
<description>Maven wrapper for Ant Hadoop build</description>
|
39
|
<name>CDH Hadoop Maven Wrapper</name>
|
40
|
|
41
|
<profiles>
|
42
|
<!--To allow standalone project to fetch CDH artifacts -->
|
43
|
<!--Activate by default doing a negation of negation -->
|
44
|
<!-- this trick allows CDH root to switch it off -->
|
45
|
<profile>
|
46
|
<id>cdh.repos</id>
|
47
|
<activation>
|
48
|
<activeByDefault>false</activeByDefault>
|
49
|
<property>
|
50
|
<name>use.cdh.repos</name>
|
51
|
<value>!false</value>
|
52
|
</property>
|
53
|
</activation>
|
54
|
<repositories>
|
55
|
<repository>
|
56
|
<id>cdh.releases.repo</id>
|
57
|
<url>https://repository.cloudera.com/content/groups/cdh-releases-rcs</url>
|
58
|
<name>CDH Releases Repository</name>
|
59
|
<snapshots>
|
60
|
<enabled>false</enabled>
|
61
|
</snapshots>
|
62
|
</repository>
|
63
|
<repository>
|
64
|
<id>cdh.snapshots.repo</id>
|
65
|
<url>https://repository.cloudera.com/content/repositories/snapshots</url>
|
66
|
<name>CDH Snapshots Repository</name>
|
67
|
<snapshots>
|
68
|
<enabled>true</enabled>
|
69
|
</snapshots>
|
70
|
</repository>
|
71
|
</repositories>
|
72
|
</profile>
|
73
|
<!-- Similar logic to allow us to skip compilation/tests when run -->
|
74
|
<!-- via do-release-build or packaging scripts, since we're already -->
|
75
|
<!-- compiling via direct ant calls. -->
|
76
|
<profile>
|
77
|
<id>non.release.build</id>
|
78
|
<activation>
|
79
|
<activeByDefault>false</activeByDefault>
|
80
|
<property>
|
81
|
<name>not.cdh.release.build</name>
|
82
|
<value>!false</value>
|
83
|
</property>
|
84
|
</activation>
|
85
|
<build>
|
86
|
<plugins>
|
87
|
<plugin>
|
88
|
<groupId>org.apache.maven.plugins</groupId>
|
89
|
<artifactId>maven-antrun-plugin</artifactId>
|
90
|
<version>1.6</version>
|
91
|
<inherited>false</inherited>
|
92
|
<executions>
|
93
|
<execution>
|
94
|
<id>clean</id>
|
95
|
<configuration>
|
96
|
<target>
|
97
|
<exec executable="${ant.cmd}" dir="${basedir}" failonerror="true">
|
98
|
<arg value="clean"/>
|
99
|
<arg value="-Dcdh.maven=true"/>
|
100
|
<arg value="-Divy.cache.dir=${ivy.cache.dir}"/>
|
101
|
</exec>
|
102
|
</target>
|
103
|
</configuration>
|
104
|
<goals>
|
105
|
<goal>run</goal>
|
106
|
</goals>
|
107
|
<phase>clean</phase>
|
108
|
</execution>
|
109
|
<execution>
|
110
|
<id>compile</id>
|
111
|
<configuration>
|
112
|
<target>
|
113
|
<exec executable="${ant.cmd}" dir="${basedir}" failonerror="true">
|
114
|
<arg value="bin-package"/>
|
115
|
<arg value="-Dcdh.maven=true"/>
|
116
|
<arg value="-Divy.cache.dir=${ivy.cache.dir}"/>
|
117
|
</exec>
|
118
|
</target>
|
119
|
</configuration>
|
120
|
<goals>
|
121
|
<goal>run</goal>
|
122
|
</goals>
|
123
|
<phase>compile</phase>
|
124
|
</execution>
|
125
|
<execution>
|
126
|
<id>test</id>
|
127
|
<configuration>
|
128
|
<target unless="${skipTests}">
|
129
|
<exec executable="${ant.cmd}" dir="${basedir}" failonerror="true">
|
130
|
<arg value="test"/>
|
131
|
<arg value="-Dcdh.maven=true"/>
|
132
|
<arg value="-Divy.cache.dir=${ivy.cache.dir}"/>
|
133
|
</exec>
|
134
|
</target>
|
135
|
</configuration>
|
136
|
<goals>
|
137
|
<goal>run</goal>
|
138
|
</goals>
|
139
|
<phase>test</phase>
|
140
|
</execution>
|
141
|
</executions>
|
142
|
</plugin>
|
143
|
</plugins>
|
144
|
</build>
|
145
|
</profile>
|
146
|
<!-- Profile that's only activated when we're calling as a release build, to run -->
|
147
|
<!-- with variables set *and* tar target -->
|
148
|
<profile>
|
149
|
<id>cdh.release.build</id>
|
150
|
<activation>
|
151
|
<activeByDefault>false</activeByDefault>
|
152
|
<property>
|
153
|
<name>not.cdh.release.build</name>
|
154
|
<value>false</value>
|
155
|
</property>
|
156
|
</activation>
|
157
|
<build>
|
158
|
<plugins>
|
159
|
<plugin>
|
160
|
<groupId>org.apache.maven.plugins</groupId>
|
161
|
<artifactId>maven-antrun-plugin</artifactId>
|
162
|
<inherited>false</inherited>
|
163
|
<executions>
|
164
|
<execution>
|
165
|
<id>tar</id>
|
166
|
<configuration>
|
167
|
<target if="do.full.compile">
|
168
|
<property file="${basedir}/build.properties"/>
|
169
|
<exec executable="/bin/bash" dir="${basedir}/cloudera" failonerror="true">
|
170
|
<arg value="do-release-build" />
|
171
|
<env key="SKIP_MVN_EXPLICIT" value="true" />
|
172
|
</exec>
|
173
|
</target>
|
174
|
</configuration>
|
175
|
<goals>
|
176
|
<goal>run</goal>
|
177
|
</goals>
|
178
|
<phase>compile</phase>
|
179
|
</execution>
|
180
|
</executions>
|
181
|
</plugin>
|
182
|
</plugins>
|
183
|
</build>
|
184
|
</profile>
|
185
|
</profiles>
|
186
|
|
187
|
<build>
|
188
|
<plugins>
|
189
|
|
190
|
<plugin>
|
191
|
<groupId>com.cloudera.kitchen</groupId>
|
192
|
<artifactId>maven-deps-to-props-plugin</artifactId>
|
193
|
|
194
|
<executions>
|
195
|
<execution>
|
196
|
<id>build.properties</id>
|
197
|
<configuration>
|
198
|
<templateFile>${basedir}/cloudera/maven-packaging/templates/build.template</templateFile>
|
199
|
<targetFile>${basedir}/build.properties</targetFile>
|
200
|
</configuration>
|
201
|
<goals>
|
202
|
<goal>generate</goal>
|
203
|
</goals>
|
204
|
<phase>process-resources</phase>
|
205
|
</execution>
|
206
|
</executions>
|
207
|
</plugin>
|
208
|
</plugins>
|
209
|
</build>
|
210
|
|
211
|
</project>
|