maven 2 - Removing generated resources from a jar file -
hello using maven2-xdoclet2-plugin generate hibernate mappings
the config of xdoclet similar this:
<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>
when run
mvn clean generate-resources
it following thing:
tree -l 2 target/classes/ target/classes/ |-- com | `-- company | `-- (the mappings generated) `-- generated-resources `-- xdoclet `-- com `-- company `-- (the mappings generated)
so want avoid have directory "generated-resources" inside jar file.
how can that? did few google searches without luck.
you mapping files packed jar file because mapping files generated wrong output directory. configured:
<destdir>${project.build.directory}/classes</destdir>
so mapping files generated inside target/classes/
folder used build output jar file. try other directory like:
<destdir>${project.build.directory}/generated</destdir>
Comments
Post a Comment