xml-maven-plugin icon indicating copy to clipboard operation
xml-maven-plugin copied to clipboard

Skip validation/transformation when base directory does not exist

Open sewe opened this issue 4 years ago • 2 comments

At the moment, defining an <execution> of the validate or transform goals in a parent POM, meant to be reused across various child projects, is really cumbersome since is requires the <dir> configured in the <validationSet> or <transformationSet> to exist in the parent, too; Otherwise, the build fails:

The directory /tmp/parent/src/main/xml, which is a base directory of a ValidationSet or TransformationSet, does not exist.

Would it be possible to implement a Skip non-existing base directory behavior, either optionally or even as a default? This would mirror the maven-resources-plugin or maven-compiler-plugin, which simply emit an [INFO] level message and skip further execution if src/main/resources or src/main/java are missing.

(Note: A partial workaround exists, using <skip>true/false<true> and <inherited>false/true</inherited> trickery, but is not pretty – and only works for a single level of inheritance.)

sewe avatar Jul 18 '20 15:07 sewe