You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mi...@gmail.com> on 2009/03/18 13:16:38 UTC
need persistence.xml for building and testing, but not in final
artifact
I am trying to create a generic JPA jar that just has my JPA related
classes. Then I plan to have another jar with my domain objects for use in
various projects. What I need to do, is have my persistence.xml in my
src/main/resources for building and testing, but omitted in my final jar.
This way my domain.jar can add the persistence.xml
I tried:
*<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>applicationContext*.xml</exclude>
<exclude>**/persistence.xml</exclude>
</excludes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>applicationContext*.xml</include>
</includes>
<excludes>
<exclude>**/persistence.xml</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/main/resources</directory>
<includes>
<include>**/persistence.xml</include>
</includes>
<filtering>true</filtering>
</testResource>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>database.properties</exclude>
</excludes>
</testResource>
</testResources>
*
But it appears that my hibernate3 plugin is not finding it in the classpath.
I found this posting
http://www.nabble.com/Hibernate3-Maven-Plugin-NPE-td18836071.html
But no resolution. Can anyone help?
---
Thank You…
Mick Knutson, President
BASE Logic, Inc.
Enterprise Architecture, Design, Mentoring & Agile Consulting
p. (866) BLiNC-411: (254-6241-1)
f. (415) 685-4233
Website: http://baselogic.com
Linked IN: http://linkedin.com/in/mickknutson
Twitter: http://twitter.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com
---