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">
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
14 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 <modelVersion>4.0.0</modelVersion>
26 <artifactId>hbase-archetypes</artifactId>
27 <groupId>org.apache.hbase</groupId>
28 <version>2.4.0</version>
29 <relativePath>..</relativePath>
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>
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.) -->
52 <artifactId>maven-resources-plugin</artifactId>
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. -->
60 <id>hbase-client__copy-src-to-build-archetype-subdir</id>
61 <phase>generate-resources</phase>
63 <goal>copy-resources</goal>
66 <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}</outputDirectory>
69 <directory>/${project.basedir}/../${hbase-client.dir}</directory>
71 <include>src/**</include>
78 <id>hbase-client__copy-pom-to-temp-for-xslt-processing</id>
79 <phase>generate-resources</phase>
81 <goal>copy-resources</goal>
84 <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${temp.exemplar.subdir}</outputDirectory>
87 <directory>/${project.basedir}/../${hbase-client.dir}</directory>
88 <filtering>true</filtering> <!-- filtering replaces ${project.version} with literal -->
90 <include>pom.xml</include>
97 <id>hbase-shaded-client__copy-src-to-build-archetype-subdir</id>
98 <phase>generate-resources</phase>
100 <goal>copy-resources</goal>
103 <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}</outputDirectory>
106 <directory>/${project.basedir}/../${hbase-shaded-client.dir}</directory>
108 <include>src/**</include>
115 <id>hbase-shaded-client__copy-pom-to-temp-for-xslt-processing</id>
116 <phase>generate-resources</phase>
118 <goal>copy-resources</goal>
121 <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.exemplar.subdir}</outputDirectory>
124 <directory>/${project.basedir}/../${hbase-shaded-client.dir}</directory>
125 <filtering>true</filtering> <!-- filtering replaces ${project.version} with literal -->
127 <include>pom.xml</include>
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. -->
139 <id>hbase-client-ARCHETYPE__copy-pom-to-temp-for-xslt-processing</id>
140 <phase>prepare-package</phase>
142 <goal>copy-resources</goal>
145 <outputDirectory>/${project.basedir}/../${hbase-client.dir}/${temp.archetype.subdir}</outputDirectory>
148 <directory>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</directory>
150 <include>pom.xml</include>
157 <id>hbase-shaded-client-ARCHETYPE__copy-pom-to-temp-for-xslt-processing</id>
158 <phase>prepare-package</phase>
160 <goal>copy-resources</goal>
163 <outputDirectory>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.archetype.subdir}</outputDirectory>
166 <directory>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</directory>
168 <include>pom.xml</include>
174 <!-- For new archetype, add <execution> element (modeled on existing elements) above this comment. -->
179 <groupId>org.codehaus.mojo</groupId>
180 <artifactId>xml-maven-plugin</artifactId>
182 <!-- xml-maven-plugin modifies each exemplar project's pom.xml file to convert to standalone project. -->
184 <id>modify-exemplar-pom-files-via-xslt</id>
185 <phase>process-resources</phase>
187 <goal>transform</goal>
192 <dir>/${project.basedir}/../${hbase-client.dir}/${temp.exemplar.subdir}</dir>
194 <include>pom.xml</include>
196 <outputDir>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}</outputDir>
197 <stylesheet>modify_exemplar_pom.xsl</stylesheet>
200 <dir>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.exemplar.subdir}</dir>
202 <include>pom.xml</include>
204 <outputDir>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}</outputDir>
205 <stylesheet>modify_exemplar_pom.xsl</stylesheet>
207 <!-- For new archetype, add <transformationSet> element (modeled on existing elements) above this comment. -->
208 </transformationSets>
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. -->
214 <id>modify-archetype-pom-files-via-xslt</id>
215 <phase>package</phase>
217 <goal>transform</goal>
222 <dir>/${project.basedir}/../${hbase-client.dir}/${temp.archetype.subdir}</dir>
224 <include>pom.xml</include>
226 <outputDir>/${project.basedir}/../${hbase-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</outputDir>
227 <stylesheet>modify_archetype_pom.xsl</stylesheet>
230 <dir>/${project.basedir}/../${hbase-shaded-client.dir}/${temp.archetype.subdir}</dir>
232 <include>pom.xml</include>
234 <outputDir>/${project.basedir}/../${hbase-shaded-client.dir}/${build.archetype.subdir}/${archetype.source.subdir}</outputDir>
235 <stylesheet>modify_archetype_pom.xsl</stylesheet>
237 <!-- For new archetype, add <transformationSet> element (modeled on existing elements) above this comment. -->
238 </transformationSets>
245 <artifactId>maven-antrun-plugin</artifactId>
247 <!-- exec-maven-plugin executes chmod to make scripts executable -->
249 <id>make-scripts-executable</id>
250 <phase>process-resources</phase>
255 <chmod file="${project.basedir}/createArchetypes.sh" perm="+x" />
256 <chmod file="${project.basedir}/installArchetypes.sh" perm="+x" />
259 <!-- exec-maven-plugin executes script which invokes 'archetype:create-from-project'
260 to derive archetypes from exemplar projects. -->
262 <id>run-createArchetypes-script</id>
263 <phase>compile</phase>
268 <exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true">
269 <arg line="./createArchetypes.sh"/>
273 <!-- exec-maven-plugin executes script which invokes 'install' to install each
274 archetype into the local Maven repository (ready for deployment to central
276 Note that 'install' of archetype automatically includes integration-test,
277 which does test generation of a project based on the archetype. -->
279 <id>run-installArchetypes-script</id>
280 <phase>install</phase>
285 <exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true">
286 <arg line="./installArchetypes.sh"/>