我有一个basic.xsd
和另外两个A.xsd
and B.xsd
. A.xsd
and B.xsd
转换为两个不同的 java 包,因此我需要同一插件的两次 Maven 执行。
两个 XSD 均指basic.xsd
对于一些共享类。如果basic.xsd
来自不同的项目我可以通过使用很好地解决这个问题episodes
以防止重复上课。
但我怎样才能参考当前的项目呢?
我第一次执行该插件是仅生成类basic.xsd
进入它自己的java命名空间。之后的执行A.xsd
and B.xsd
应该知道从生成的东西basic.xsd
.
我可以以某种方式指出生成的情节吗basic.xsd
?
就像是
<episodes><episodeFile>basicXSD.episode</episodeFile</episodes>
会很好,但据我所知,我只能添加依赖项...:-(
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<id>first</id>
...
<configuration>
<episodeFile>${some.path}/first.episode</episodeFile>
</configuration>
</execution>
<execution>
<id>second</id>
...
<configuration>
<args>
<arg>-b</arg>
<arg>${some.path}/first.episode</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
http://docs.oracle.com/javase/6/docs/technotes/tools/share/xjc.html
http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)