TimSoethout / transform-xml-maven-plugin

Maven plugin to transform some XML files during the build process

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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>

About

Maven plugin to transform some XML files during the build process


Languages

Language:Scala 100.0%