Community
Participate
Working Groups
We have jpa tests under <trunk>/jpa/eclipselink.jpa.test/src, these tests are able to run against Spring after James check in fix for bug 288383. Now I make changes in build.properties and build.xml under <trunk>/jpa/eclipselink.jpa.test to let two models running first against Spring, which is fieldaccess and annotation models, the changes are: 1. add following proeprty-value sets to build.properties (1). spring.jlib.dir=../../../extension.lib.external/spring (2). spring.jlib=spring.jar,spring-mock.jar,spring-agent.jar,cglib-nodep-2.2.jar,cglib-nodep-2.1_3.jar,commons-logging-1.1.1.jar,spring-test.jar,commons-logging.jar,xapool.jar,jotm-client.jar" to build.properties (3). eclipselink.jpa.spring.test=../eclipselink.jpa.spring.test 2. add "is.spring" condition property to build.xml 3. add "prepare-spring-xmls" target to prepare spring config files and persistence.xml 4. add antcall of "prepare-spring-xmls" to target of packaging model classes 5. add "test-spring-srg" target to invoke running two applicable test mdoels
Created attachment 147774 [details] This patch is for adding targets in jpa/eclipselink.jpa.test/build.xml to run existing JPA tests on Spring Also this patch updated the build.properties under jpa/eclipselink.jpa.spring.test to reflect spring jars needed for testing according to Spring 2.5.6 release. The Spring jars needed for tests under jpa/eclipselink.jpa.spring.test are: spring.jar,spring-agent.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar, spring-test.jar The Spring jars needed for tests under jpa/eclipselink.jpa.test are same as above except that the tests here don't need spring-test.jar
Created attachment 147793 [details] updated build.xml and test.properties Based on feedback from Edwin, the new changes are: 1. add "is.spring" to test.properties to specify if you are running JPA tests on Spring, by this way you don't need to use "server.name" 2. add spring.path and remove spring jars from compile.path and run.classpath 3. separate compiling spring platform class from "compile-standard" 4. instead of using common "run-test" for Spring testing, add "run-spring-test" target specifically for Spring testing to specify TEST-SERVER_PLATFORM to be "org.eclipse.persistence.testing.framework.server.SpringPlatform"
fix has been checked in Main as revision 5214.
it has been checked in 1.2 branch as well
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink