Marcus Leon
Marcus Leon

Reputation: 56699

Include XSD in Jar with Maven?

We have an XSD file along with some java src files. How can we instruct Maven to include the XSD in the jar file output? Currently it appears to ignore the file.

Upvotes: 5

Views: 7178

Answers (2)

lexicore
lexicore

Reputation: 43699

Alternative, configure project/build/resources in your pom. See this reference.

Upvotes: 3

kopper
kopper

Reputation: 2736

Put the XSD file under src/main/resources folder. This should be enough. By default all files under this directory are copied to target/classes directory and from there are picked up by maven-jar-plugin by default.

Upvotes: 9

Related Questions