1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <xsl:transform version=
"2.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
3 xmlns:
pom=
"http://maven.apache.org/POM/4.0.0">
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 <xsl:output indent=
"yes"/>
25 <!-- copy all items from source to target with standard 'identity' template; -->
26 <xsl:template match=
"@*|node()">
28 <xsl:apply-templates select=
"@*|node()"/>
32 <!-- copy groupId and version elements from parent element to top-level -->
33 <xsl:template match=
"pom:project[not(pom:groupId)]">
35 <xsl:apply-templates select=
"@*"/>
36 <xsl:copy-of select=
"pom:parent/pom:groupId"/>
37 <xsl:copy-of select=
"pom:parent/pom:version"/>
38 <xsl:apply-templates select=
"node()"/>
42 <!-- find 'parent' element, and replace it with nothing (i.e. remove it) -->
43 <xsl:template match=
"pom:parent"/>
45 <!-- find 'description' element, and replace it with nothing (i.e. remove it) -->
46 <xsl:template match=
"pom:description"/>