I added the following dependency to my pom.xml so that my static meta model classes can be generated for my JPA entities. The meta model classes are generated as expected. However, I observed that the generated source files for the generated classes are also included in the jar as well. How do I make maven exclude the generated source files from being bundled in the jar as well.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>