您好,我正在使用 maven2-xdoclet2-plugin 生成休眠映射
xdoclet 的配置与此类似:
<plugin>
<groupId>org.codehaus.xdoclet</groupId>
<artifactId>maven2-xdoclet2-plugin</artifactId>
<version>2.0.7</version>
<executions>
<execution>
<id>xdoclet</id>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
</execution>
</executions>
(... dependencies ...)
<configuration>
<configs>
<config>
<components>
<component>
<classname>org.xdoclet.plugin.hibernate.HibernateMappingPlugin</classname>
<params>
<version>3.0</version>
</params>
</component>
</components>
<params>
<destdir>${project.build.directory}/classes</destdir>
</params>
</config>
</configs>
</configuration>
当我跑
mvn clean generate-resources
它得到以下内容:
tree -L 2 target/classes/
target/classes/
|-- com
| `-- company
| `-- (the mappings generated)
`-- generated-resources
`-- xdoclet
`-- com
`-- company
`-- (the mappings generated)
所以我要避免的是在 jar 文件中包含“生成的资源”目录。
我怎样才能做到这一点?我没有太多运气做了一些谷歌搜索。