mojohaus / jaxb2-maven-plugin

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

.java files in classpath #110

Closed pioto closed 6 years ago

pioto commented 6 years ago

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.

lennartj commented 6 years ago

Sources should not be included within the created JAR - they should go within the separate source JAR - that is clear.

When does this behavior appear?