Using jaxb2-maven-plugin:2.5.0, When doing a maven build using the following module structure
root_dir/
├─ parent/
│ ├─ pom.xml
├─ sub-module/
│ ├─ src/
│ │ ├─ main/
│ │ │ ├─ java/
│ │ │ ├─ resources/
│ │ │ ├─ xsd/
│ │ ├─ test/
│ ├─ pom.xml
├─ .gitignore
Building using the parent results in a failure due to the fact that the base directory for the execution is */root_dir/parent, which means the check on
|
if (path.toLowerCase().startsWith(basedirPath.toLowerCase())) { |
fails, since the actual xsd source is in
*/root_dir/sub-module/src/main/xsd, and you end up with a concatenated path of
*/root_dir/parent/*/root_dir/sub-module/.
This appears to be a bug, and is only an issue in this particular module project structure where the parent and sub-module are sibling directories, and this structure won't change for my current project. I also do not have the ability to downgrade to 2.3.1 (which does not contain this bug) because I'm building with JDK17, which is missing some required classes, but at the same time, I can't jump to 3.x of the plugin because javax is still being used prolifically through the code base and it's not an option to change that at this time.
Using
jaxb2-maven-plugin:2.5.0, When doing a maven build using the following module structureBuilding using the parent results in a failure due to the fact that the base directory for the execution is
*/root_dir/parent, which means the check onjaxb2-maven-plugin/src/main/java/org/codehaus/mojo/jaxb2/shared/FileSystemUtilities.java
Line 542 in 1ac2e02
*/root_dir/sub-module/src/main/xsd, and you end up with a concatenated path of*/root_dir/parent/*/root_dir/sub-module/.This appears to be a bug, and is only an issue in this particular module project structure where the parent and sub-module are sibling directories, and this structure won't change for my current project. I also do not have the ability to downgrade to
2.3.1(which does not contain this bug) because I'm building with JDK17, which is missing some required classes, but at the same time, I can't jump to3.xof the plugin becausejavaxis still being used prolifically through the code base and it's not an option to change that at this time.