It looks like some quirk about how the plugin works means that both .java and .class files end up in target/classes/..., and thus both end up in the final .jar artifact.
Ideally, those .java files wouldn't be copied to the classpath, and only their compiled .class files would; we'd then separately build a -sources artifact that contains those .java files.
I've observed this with version 2.4; the issue does not appear to be present in version 2.3.1 of the plugin.
It looks like some quirk about how the plugin works means that both .java and .class files end up in target/classes/..., and thus both end up in the final .jar artifact.
Ideally, those .java files wouldn't be copied to the classpath, and only their compiled .class files would; we'd then separately build a -sources artifact that contains those .java files.
I've observed this with version 2.4; the issue does not appear to be present in version 2.3.1 of the plugin.