I have a webservice that will be referring to an XSD file that is in another project (imported as a dependency). I am able to pull the XSD in using the plugin in the following post. However, this pulls it directly into the source. I would rather have it added to the build directory to avoid committing the file.
If I extract the xsd to my existing project structure:
<outputDirectory>schema</outputDirectory>
It shows up in the .jar. However, if I extract it to the build directory:
<outputDirectory>${project.build.directory}/generated/schema</outputDirectory>
It does not show up in the .jar (even if I add it to the build path).
I think I am missing some fundamental understanding of the maven lifecycle. What do I need to do in order to get a file into the .jar while keeping the file in the build directory?