XSDからJavaファイルを生成しようとしていますが、以下のコードは生成されません。 outputDirectoryのコメントを外すと機能しますが、まずフォルダを削除します。 clearOutputDir = false
を追加しても何も生成されません。JAXB mavenプラグインでクラスが生成されない
<build>
<plugins>
<!-- JAXB xjc plugin that invokes the xjc compiler to compile XML schema into Java classes.-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- The package in which the source files will be generated. -->
<packageName>uk.co.infogen.camel.message</packageName>
<!-- The schema directory or xsd files. -->
<sources>
<source>${basedir}/src/main/resources/xsd</source>
</sources>
<!-- The working directory to create the generated java source files. -->
<!--<outputDirectory>${basedir}/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>-->
</configuration>
</plugin>
</plugins>
</build>
私はメッセージを取得しています:
[INFO] --- jaxb2-maven-plugin:2.2:xjc (default) @ service-business ---
[INFO] Ignored given or default xjbSources [/Users/aaa/development/workspace/infogen/infogen_example/service-business/src/main/xjb], since it is not an existent file or directory.
[INFO] No changes detected in schema or binding files - skipping JAXB generation.
sourceフォルダには生成しないでください。target/generated-sources/xjc – jah
はい私はoutputDirectoryにコメントしましたが、ソースを生成して同じ情報メッセージを与えていません。 – krmanish007