mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
105 stars 76 forks source link

Jaxb2-maven-plugin fails to find XSD files if any part of the path contains the string "readme" #136

Open Dretch opened 5 years ago

Dretch commented 5 years ago

This can be reproduced by renaming any of the containing folders for a maven build that uses jaxb2-maven-plugin so that the path contains "readme". The plugin will then fail to find the XSD files that it normally would.

I imagine the bug is related to to this code:

https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/AbstractJaxbMojo.java#L124

lennartj commented 5 years ago

Quite true, since the plugin disregards files called README. It seems to ignore directories* called readme as well.

lennartj commented 5 years ago

You can, however, workaround this by adding a custom source exclude filter, as described within:

https://www.mojohaus.org/jaxb2-maven-plugin/Documentation/v2.3.1/example_schemagen_basic.html

florianhof commented 6 months ago

This bug is annoying ... Some build system makes folder taken from git branch name. If the branch name contains readme , then the build fails. It's really not obvious to find the problem! It's the same problem as #163