eclipse - JPA resources for test and production -


i have 2 persistence files typical maven based projects.

  • src/main/resources/persistence.xml (jndi)
  • src/test/resources/persistence.xml (local_resource)

both eclipse , maven fails provide junit @ test runtime failing tests.

as last resort, try forcing copy maven-resources-plugin:

<project>   ...   <build>     <plugins>       <plugin>         <artifactid>maven-resources-plugin</artifactid>         <version>3.0.2</version>         <executions>           <execution>             <id>copy-resources</id>             <!-- here phase need -->             <phase>validate</phase>             <goals>               <goal>copy-resources</goal>             </goals>             <configuration>               <outputdirectory>${project.build.directory}</outputdirectory>               <resources>                           <resource>                   <directory>src/**/*.xml/directory>                   <filtering>true</filtering>                 </resource>               </resources>                           </configuration>                       </execution>         </executions>       </plugin>     </plugins>     ...   </build>   ... </project> 

not tested.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -