Home > Maven3 > Why my JAXB generated classes didn’t show up in the packaged jar

Why my JAXB generated classes didn’t show up in the packaged jar

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!

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: