如果有人可以帮助我,那就太好了。我是Maven的新手。执行generate-sources或编译时,Maven对它很安静,没有任何生成。
<build>
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.11.0</version>
<executions>
<execution>
<id>jaxb-test</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<forceRegenerate>true</forceRegenerate>
<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
<include>sample.xsd</include>
</schemaIncludes>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
答案 0 :(得分:3)
使用build/plugins
,而不是build/plugins/pluginManagement
。
请参阅完整的副本:
maven goal doesn't execute properly if plugins are defined under pluginManagement