HBASE-24102 : Remove decommissioned RS from target servers while unlo… (#1417)
[hbase.git] / hbase-archetypes / hbase-archetype-builder / modify_archetype_pom.xsl
blobe27e51d3c72b1af00847c52cca659c4886ba930c
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:pom="http://maven.apache.org/POM/4.0.0"
4 exclude-result-prefixes="pom">
5 <!--
6 /**
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements. See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership. The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License. You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 * See the License for the specific language governing permissions and
21 * limitations under the License.
23 -->
24 <xsl:output indent="yes"/>
26 <!-- copy all items from source to target with standard 'identity' template -->
27 <xsl:template match="@*|node()">
28 <xsl:copy>
29 <xsl:apply-templates select="@*|node()"/>
30 </xsl:copy>
31 </xsl:template>
33 <!-- if properties element doesn't exist, insert it with sourceEncoding subelement -->
34 <xsl:template match="pom:project[not(pom:properties)]">
35 <xsl:copy>
36 <xsl:apply-templates select="@*"/>
37 <properties>
38 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39 </properties>
40 <xsl:apply-templates select="node()"/>
41 </xsl:copy>
42 </xsl:template>
44 <!-- if properties element exists without sourceEncoding subelement, insert it -->
45 <xsl:template match="pom:properties[not(pom:project.build.sourceEncoding)]">
46 <xsl:copy>
47 <xsl:apply-templates select="@*"/>
48 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
49 <xsl:apply-templates select="node()"/>
50 </xsl:copy>
51 </xsl:template>
53 </xsl:transform>