JAXB maven 插件不生成类
我正在尝试从XSD生成java文件,但下面的代码没有生成。如果我取消注释 outputDirectory,它可以工作,但首先删除该文件夹。添加也不会生成任何内容。clearOutputDir = false
<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.