The following problem bugged me for like 2 days:
My maven project generates classes using a maven jaxb2 plugin, but it also inherits settings from a parent project. After running “maven package” and seeing the jaxb plugin generate classes from the schema i was surprised to see zero classes showing up in the created jar file. After many hours of commenting out pieces of maven configuration in both my project and in the parent i found out that the “fork” setting on the compiler plugin was set to “true”. This didn’t seem like a setting that was causing the problem, but when i switched it to false the problem was suddenly sovled and my beloved classes settled nicely in the generated jar file.
I still don’t know why this setting causes the problem, but if you have the same problem you have now found the solution!