Skip to content

TimSoethout/transform-xml-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages