Java 6 で jaxb2-maven-plugin を使用して、maven で Java クラスからスキーマ ファイルを生成しようとしています。通常は正常に動作します。
さらに、完全なスキーマ機能をサポートするためにjaxb-facetsフォークを使用しています。一般に、jaxb-facets が機能するには、標準の jaxb 実装をオーバーライドする必要があります。しかし、これが問題のようです。jaxb2-maven-plugin を使用する場合、プラグインは常に元の jaxb 実装をダウンロードします。お勧めの攻略法を使ってみましたが、違いはないようです。
私は何時間も頭を叩いています:-(((
これは私のpomファイルの関連部分です:
<!-- The jaxb-facets depedencies: Note that jaxb-facets should be at the top of all dependencies (at least before any dependencies to JAXB libraries) -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.7-facets-1.0.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.6</version>
</dependency> ...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<argline>-Djava.endorsed.dirs="${project.build.directory}/endorsed"</argline>
</configuration>
<executions>
<execution>
<goals>
<goal>schemagen</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<includes>
<include>de/dvka/avaro/model/schema/*.java</include>
</includes>
<outputDirectory>src/main/java/de/dvka/avaro/model/schema</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>