Stephan Schroevers opened MCHECKSTYLE-444 and commented
In the context of MCHECKSTYLE-412 a new excludeGeneratedSources option was introduced. This feature does not exclude generated {}resources{}, however. Generated resources are not uncommon:
- The license-maven-plugin attaches a
THIRD-PARTY.txt file.
- The hisrc-basicjaxb plugin attaches a
META-INF/sun-jaxb.episode file, located in a directory that also contains generated sources ((!)).
As a result, if one sets
<excludeGeneratedSources>true</excludeGeneratedSources>
<resourceIncludes>**/*</resourceIncludes>
Then the plugin will flag THIRD-PARTY.txt files (not completely unexpected) as well as XJC-generated Java files (very unexpected).
Possible fixes:
- Update the
excludeGeneratedSources flag to also cover (test) resource directories.
- Introduce an analogous
excludeGeneratedResources flag.
(The first option may seem less flexible, but would be less surprising i.c.w. plugins that generate sources and resources into the same directory, as in example (2) above.)
I'm open to contributing a PR for this change; it would be nice to first hear from the maintainers whether they prefer approach (1) or (2).
Affects: 3.3.1
Issue Links:
- MCHECKSTYLE-412 Add option to exclude generated sources/test-sources from default source/test-source directories
Stephan Schroevers opened MCHECKSTYLE-444 and commented
In the context of MCHECKSTYLE-412 a new
excludeGeneratedSourcesoption was introduced. This feature does not exclude generated {}resources{}, however. Generated resources are not uncommon:THIRD-PARTY.txtfile.META-INF/sun-jaxb.episodefile, located in a directory that also contains generated sources ((!)).As a result, if one sets
Then the plugin will flag
THIRD-PARTY.txtfiles (not completely unexpected) as well as XJC-generated Java files (very unexpected).Possible fixes:
excludeGeneratedSourcesflag to also cover (test) resource directories.excludeGeneratedResourcesflag.(The first option may seem less flexible, but would be less surprising i.c.w. plugins that generate sources and resources into the same directory, as in example (2) above.)
I'm open to contributing a PR for this change; it would be nice to first hear from the maintainers whether they prefer approach (1) or (2).
Affects: 3.3.1
Issue Links: