Transform XML Maven Plugin

Maven plugin which can transform xml during the build. Currently supports deleting of nodes by xpath.

License

License

MIT
Categories

Categories

Maven Build Tools ORM Data
GroupId

GroupId

nl.timmybankers.maven
ArtifactId

ArtifactId

transform-xml-maven-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Transform XML Maven Plugin
Maven plugin which can transform xml during the build. Currently supports deleting of nodes by xpath.
Project URL

Project URL

https://github.com/TimSoethout/transform-xml-maven-plugin
Source Code Management

Source Code Management

https://github.com/TimSoethout/transform-xml-maven-plugin

Download transform-xml-maven-plugin

How to add to project

<plugin>
    <groupId>nl.timmybankers.maven</groupId>
    <artifactId>transform-xml-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-tools-api Optional jar 3.4
org.apache.maven.plugin-tools : maven-plugin-annotations Optional jar 3.4
org.scala-lang.modules : scala-xml_2.11 Optional jar 1.0.3
org.scalesxml : scales-jaxen_2.11 Optional jar 0.6.0-M3
org.scala-lang : scala-library Optional jar 2.11.6

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 Optional jar 2.2.4

Project Modules

There are no modules declared in this project.

transform-xml-maven-plugin

Codacy Badge

Maven-plugin which can be used to transform xml as part of your build process.

For now only supports deleting of xml element which conform to an xpath query.

usage:

mvn nl.timmybankers.maven:transform-xml-maven-plugin:1.0-SNAPSHOT:transform-xml -DinputXmlPath="/Users/tim/workspace/api-toolkit/toolkit-http/target/site/cobertura/coverage.xml" -Dxpath="//class[contains(@filename,'.scala')]" -DoutputXmlPath=/tmp/test.xml

maven plugin usage:

    <build>
        <plugins>
            <plugin>
                <groupId>nl.timmybankers.maven</groupId>
                <artifactId>transform-xml-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <executions>
                  <execution>
                      <phase>verify</phase>
                      <goals>
                          <goal>transform-xml</goal>
                      </goals>
                  </execution>
                </executions>
                <configuration>
                    <inputXmlPath>${project.build.directory}/site/cobertura/coverage.xml</inputXmlPath>
                    <outputXmlPath>${sonar.build.directore}/coverage-without-scala.xml</outputXmlPath>
                    <xpath>//class[contains(@filename,'.scala')]</xpath>
                    <action>DELETE</action>
                    <skipOnFileErrors>true</skipOnFileErrors>
                </configuration>
            </plugin>
        </plugins>
    </build>

Versions

Version
1.0.0