hi maven-users I've found the answer to my problem: I just searched the JPA-specs about the location of persistence.xml and was quite surprised to read the following: "The root of the persistence unit is the WEB-INF/classes directory; the persistence.xml file is therefore contained in the WEB-INF/classes/META-INF directory."
This means: placing the META-INF folder and the persistence.xml file under "src/main/resources" so that it is copied to WEB-INF/classes is simply correct behaviour. Thanks anyway for your answers Stefan Stefan Burkard wrote: > > hi maven-users > > I've got the following problem: if I'm creating a webapp and put the > META-INF directory into "src/main/webapp" the files in it (for example > persistence.xml) are NOT on the classpath and therefore my tests are > failing, I can't package my project. > > if I'm putting the META-INF directory under "src/main/resources", the > files are on the classpath, the tests succeed, the WAR file is built. > BUT: if I explode the WAR, my META-INF directory and it's files are under > "/WEB-INF/classes/". strange place for META-INF, isn't it? > > is it possible to have the files for the META-INF directory on the > classpath and copy them on packaging into the correct location (for > example "/META-INF/persistence.xml")? > > thanks and greetings > stefan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/META-INF-directory-for-webapps-not-in-classpath-tf2892575s177.html#a8085526 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
