| As a workaround on Java 11, you can add jaxb-api itself as an annotationProcessorPath:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</annotationProcessorPath>
<path>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
This will add the dependency to the classpath used by annotation processors. Maven won't complain that the JAR doesn't contain any annotation processor. Note that you will probably need to jaxb-api as a regular compile dependency too, if the generated code uses classes from javax.xml.bind (although I don't know in which case it can happen). |