You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dan King <da...@yahoo.com> on 2010/05/13 18:25:29 UTC

Re: [Solved] Integrating persistence (sub)module into web app

>I have a persistence module that contains, among other things, entity classes and the persistence.xml file. I've stored the persistence.xml file in 
>"src/main/resources/meta-inf". When I build the app from the parent directory (directory that contains the parent pom), the persistence.xml file is NOT 
> added to the META-INF directory of the web app. 

>Also, since the persistence.xml file  currently resides in the same jar as the entity classes, I do not need to specify them; if I move the persistence.xml 
> file to the meta-inf directory I'd have to list the entities. Is there a way around this? Thanks.

The root of the problem was the (fat32) partition where I stored my
code. When I created the  "META-INF" directory in
"src/main/resources" the partition renamed it to "meta-inf". Therefore during the build process the META-INF directory was missing, and thus so was the persistence.xml file. I originally thought that I wasn't using maven correctly. So as temporary solution I manually added the persistence.xml file to the web apps META-INF directory, but this required me to list my entity classes in the persistence.xml file; thus leading to my questions above. 

Modifying my partition setting solved the "problem."

-Dan




      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

How can I get maven to automatically copy (or move) my persistence.xml file from my persistence module's meta-inf directory to the web app's meta-inf directory?



      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org