Where to put persistence.xml in library jar using maven?

前端 未结 4 1334
无人及你
无人及你 2020-12-24 11:45

At work we have an entity library which is used by several clients for the library (several servlets, a desktop application, etc.). The entity library consists of JPA-Annota

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 11:59

    In the maven pom.xml file you have to add the resource directory, so you don't have to add it to the build-path in eclipse manually.

    
      ...
      
        ...
        
          
            src/resources
          
        
        ...
      
      ...
    
    

    see: http://maven.apache.org/plugins/maven-resources-plugin/examples/resource-directory.html

提交回复
热议问题