Preparing hbase release 2.4.0RC0; tagging and updates to CHANGES.md and RELEASENOTES.md
[hbase.git] / hbase-archetypes / hbase-archetype-builder / pom.xml
blobe4764ca22806b831c17d8116741035a94efcdbad
1 <?xml version="1.0"?>
2 <project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
3   xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4   <!--
5   /**
6    * Licensed to the Apache Software Foundation (ASF) under one
7    * or more contributor license agreements.  See the NOTICE file
8    * distributed with this work for additional information
9    * regarding copyright ownership.  The ASF licenses this file
10    * to you under the Apache License, Version 2.0 (the
11    * "License"); you may not use this file except in compliance
12    * with the License.  You may obtain a copy of the License at
13    *
14    *     http://www.apache.org/licenses/LICENSE-2.0
15    *
16    * Unless required by applicable law or agreed to in writing, software
17    * distributed under the License is distributed on an "AS IS" BASIS,
18    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19    * See the License for the specific language governing permissions and
20    * limitations under the License.
21    */
22   -->
23   <modelVersion>4.0.0</modelVersion>
25   <parent>
26     <artifactId>hbase-archetypes</artifactId>
27     <groupId>org.apache.hbase</groupId>
28     <version>2.4.0</version>
29     <relativePath>..</relativePath>
30   </parent>
32   <artifactId>hbase-archetype-builder</artifactId>
33   <packaging>pom</packaging>
35   <name>Apache HBase - Archetype builder</name>
36   <description>Manager of plugins for building Maven archetypes from exemplars</description>
38   <properties>
39     <build.archetype.subdir>target/build-archetype</build.archetype.subdir>
40     <archetype.source.subdir>target/generated-sources/archetype</archetype.source.subdir>
41     <temp.exemplar.subdir>target/temp</temp.exemplar.subdir>
42     <temp.archetype.subdir>target/temp-arch</temp.archetype.subdir>
43     <hbase-client.dir>hbase-client-project</hbase-client.dir>
44     <hbase-shaded-client.dir>hbase-shaded-client-project</hbase-shaded-client.dir>
45     <!-- For new archetype, add corresponding *.dir property above this comment.
46          (See hbase-archetypes/README.txt for details on adding new archetype.) -->
47   </properties>
49   <build>
50     <plugins>
51       <plugin>
52         <artifactId>maven-resources-plugin</artifactId>
53         <executions>
54           <!-- maven-resources-plugin copies each exemplar project's src directory to
55             ${build.archetype.subdir} subdirectory, and copies each project's pom.xml file
56             to ${temp.exemplar.subdir} subdirectory. (Filtering during copy replaces
57             ${project-version} with literal value). The pom.xml files are processed
58             further using xml-maven-plugin for xslt transformation, below. -->
59           <execution>
60             <id>hbase-client__copy-src-to-build-archetype-subdir</id>
61             <phase>generate-resources</phase>
62             <goals>
63               <goal>copy-resources</goal>
64             </goals>
65             <configuration>
66               <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}</outputDirectory>
67               <resources>
68                 <resource>
69                   <directory>/${project.basedir}/../${hbase-client.dir}</directory>
70                   <includes>
71                     <include>src/**</include>
72                   </includes>
73                 </resource>
74               </resources>
75             </configuration>
76           </execution>
77           <execution>
78             <id>hbase-client__copy-pom-to-temp-for-xslt-processing</id>
79             <phase>generate-resources</phase>
80             <goals>
81               <goal>copy-resources</goal>
82             </goals>
83             <configuration>
84               <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${temp.exemplar.subdir}</outputDirectory>
85               <resources>
86                 <resource>
87                   <directory>/${project.basedir}/../${hbase-client.dir}</directory>
88                   <filtering>true</filtering> <!-- filtering replaces ${project.version} with literal -->
89                   <includes>
90                     <include>pom.xml</include>
91                   </includes>
92                  </resource>
93               </resources>
94             </configuration>
95           </execution>
96           <execution>
97             <id>hbase-shaded-client__copy-src-to-build-archetype-subdir</id>
98             <phase>generate-resources</phase>
99             <goals>
100               <goal>copy-resources</goal>
101             </goals>
102             <configuration>
103               <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}</outputDirectory>
104               <resources>
105                 <resource>
106                   <directory>/${project.basedir}/../${hbase-shaded-client.dir}</directory>
107                   <includes>
108                     <include>src/**</include>
109                   </includes>
110                 </resource>
111               </resources>
112             </configuration>
113           </execution>
114           <execution>
115             <id>hbase-shaded-client__copy-pom-to-temp-for-xslt-processing</id>
116             <phase>generate-resources</phase>
117             <goals>
118               <goal>copy-resources</goal>
119             </goals>
120             <configuration>
121               <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.exemplar.subdir}</outputDirectory>
122               <resources>
123                 <resource>
124                   <directory>/${project.basedir}/../${hbase-shaded-client.dir}</directory>
125                   <filtering>true</filtering> <!-- filtering replaces ${project.version} with literal -->
126                   <includes>
127                     <include>pom.xml</include>
128                   </includes>
129                  </resource>
130               </resources>
131             </configuration>
132           </execution>
133           <!-- For new archetype, add pair of <execution> elements (modeled on existing elements) above this comment. -->
135           <!-- maven-resources-plugin copies each archetype project's pom.xml file
136             to target/temp-arch directory. The pom.xml files are processed further
137             using xml-maven-plugin for xslt transformation, below.  -->
138           <execution>
139             <id>hbase-client-ARCHETYPE__copy-pom-to-temp-for-xslt-processing</id>
140             <phase>prepare-package</phase>
141             <goals>
142               <goal>copy-resources</goal>
143             </goals>
144             <configuration>
145               <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${temp.archetype.subdir}</outputDirectory>
146               <resources>
147                 <resource>
148                   <directory>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</directory>
149                   <includes>
150                     <include>pom.xml</include>
151                   </includes>
152                  </resource>
153               </resources>
154             </configuration>
155           </execution>
156           <execution>
157             <id>hbase-shaded-client-ARCHETYPE__copy-pom-to-temp-for-xslt-processing</id>
158             <phase>prepare-package</phase>
159             <goals>
160               <goal>copy-resources</goal>
161             </goals>
162             <configuration>
163               <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.archetype.subdir}</outputDirectory>
164               <resources>
165                 <resource>
166                   <directory>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</directory>
167                   <includes>
168                     <include>pom.xml</include>
169                   </includes>
170                  </resource>
171               </resources>
172             </configuration>
173           </execution>
174           <!-- For new archetype, add <execution> element (modeled on existing elements) above this comment. -->
175         </executions>
176       </plugin>
178       <plugin>
179         <groupId>org.codehaus.mojo</groupId>
180         <artifactId>xml-maven-plugin</artifactId>
181         <executions>
182           <!-- xml-maven-plugin modifies each exemplar project's pom.xml file to convert to standalone project. -->
183           <execution>
184             <id>modify-exemplar-pom-files-via-xslt</id>
185             <phase>process-resources</phase>
186             <goals>
187               <goal>transform</goal>
188             </goals>
189             <configuration>
190               <transformationSets>
191                 <transformationSet>
192                   <dir>/${project.basedir}/../${hbase-client.dir}/${temp.exemplar.subdir}</dir>
193                   <includes>
194                     <include>pom.xml</include>
195                   </includes>
196                   <outputDir>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}</outputDir>
197                   <stylesheet>modify_exemplar_pom.xsl</stylesheet>
198                 </transformationSet>
199                 <transformationSet>
200                   <dir>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.exemplar.subdir}</dir>
201                   <includes>
202                     <include>pom.xml</include>
203                   </includes>
204                   <outputDir>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}</outputDir>
205                   <stylesheet>modify_exemplar_pom.xsl</stylesheet>
206                 </transformationSet>
207                 <!-- For new archetype, add <transformationSet> element (modeled on existing elements) above this comment. -->
208               </transformationSets>
209             </configuration>
210           </execution>
211           <!-- xml-maven-plugin modifies each archetype project's pom.xml file, inserting sourceEncoding element to
212                prevent warnings when project is generated from archetype.  -->
213           <execution>
214             <id>modify-archetype-pom-files-via-xslt</id>
215             <phase>package</phase>
216             <goals>
217               <goal>transform</goal>
218             </goals>
219             <configuration>
220               <transformationSets>
221                 <transformationSet>
222                   <dir>/${project.basedir}/../${hbase-client.dir}/${temp.archetype.subdir}</dir>
223                   <includes>
224                     <include>pom.xml</include>
225                   </includes>
226                   <outputDir>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</outputDir>
227                   <stylesheet>modify_archetype_pom.xsl</stylesheet>
228                 </transformationSet>
229                 <transformationSet>
230                   <dir>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.archetype.subdir}</dir>
231                   <includes>
232                     <include>pom.xml</include>
233                   </includes>
234                   <outputDir>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</outputDir>
235                   <stylesheet>modify_archetype_pom.xsl</stylesheet>
236                 </transformationSet>
237                 <!-- For new archetype, add <transformationSet> element (modeled on existing elements) above this comment. -->
238               </transformationSets>
239             </configuration>
240           </execution>
241         </executions>
242       </plugin>
244       <plugin>
245       <artifactId>maven-antrun-plugin</artifactId>
246         <executions>
247           <!-- exec-maven-plugin executes chmod to make scripts executable -->
248           <execution>
249             <id>make-scripts-executable</id>
250             <phase>process-resources</phase>
251             <goals>
252               <goal>run</goal>
253             </goals>
254             <configuration>
255               <chmod file="${project.basedir}/createArchetypes.sh" perm="+x" />
256               <chmod file="${project.basedir}/installArchetypes.sh" perm="+x" />
257             </configuration>
258           </execution>
259           <!-- exec-maven-plugin executes script which invokes 'archetype:create-from-project'
260                to derive archetypes from exemplar projects. -->
261           <execution>
262             <id>run-createArchetypes-script</id>
263             <phase>compile</phase>
264             <goals>
265               <goal>run</goal>
266             </goals>
267             <configuration>
268               <exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true">
269                  <arg line="./createArchetypes.sh"/>
270                </exec>
271             </configuration>
272           </execution>
273           <!-- exec-maven-plugin executes script which invokes 'install' to install each
274                archetype into the local Maven repository (ready for deployment to central
275                Maven repository).
276                Note that 'install' of archetype automatically includes integration-test,
277                which does test generation of a project based on the archetype. -->
278           <execution>
279             <id>run-installArchetypes-script</id>
280             <phase>install</phase>
281             <goals>
282               <goal>run</goal>
283             </goals>
284             <configuration>
285               <exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true">
286                  <arg line="./installArchetypes.sh"/>
287                </exec>
288             </configuration>
289           </execution>
290         </executions>
291       </plugin>
292     </plugins>
293   </build>
294 </project>