You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Zarick Lau <za...@gmail.com> on 2007/08/24 09:40:37 UTC

Phase to validate source for 'processed files'

Dear users and developers,

I'm playing the xml-maven-plugin:validate (codehaus). I try to use it
to validate all XMLs (JavaEE, spring), however, I come across a problem:

I use filters to filter XML files under src/main/resources

Most XML are "filtered" during process-resources. (std maven way)

If I would like to validate my XML files, (against the published schema),
the input to the validation is only available after "process-resources".

Then, which phase should I bind the 'validate' goal into?

I originally bind the validate goal with 'validate' phase, but validate phase
execute before "process-resources", hence, validate will always failed.

Then, I would try to bind the validate goal with "verify" phase, with that,
I still have to direct the plugin to search for files under "target/" folder.

This caused another two problems:
1. In a multi-module setup, the parent module (packaging==pom) will
not have /target
   folder, and the plugin will failed (IMO, it is bug of the plugin)
2. Asking a plugin to process files in "/target" looks ugly (what do you think?)

After all, I think, one of the best strengths of Maven for me is, convention
over customization. And 'validating' XML files can be thought as a
very common goals for most project, than, what should be the answer for this
task in "maven way"??

Thanks!

Best regards,
Zarick

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org