View | Details | Raw Unified | Return to bug 290065 | Differences between
and this patch

Collapse All | Expand All

(-)eclipselink.jpa.spring.test/build.properties (-1 / +1 lines)
Lines 38-41 Link Here
38
spring.jlib.dir=../../../extension.lib.external/spring
38
spring.jlib.dir=../../../extension.lib.external/spring
39
# Spring 2.0 uses spring-mock.jar,commons-logging-1.1.1.jar, Spring 2.5 uses spring-test.jar, commons-logging.jar
39
# Spring 2.0 uses spring-mock.jar,commons-logging-1.1.1.jar, Spring 2.5 uses spring-test.jar, commons-logging.jar
40
# JTA tests use JOTM from JOTM website (compile only jar in Spring)
40
# JTA tests use JOTM from JOTM website (compile only jar in Spring)
41
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
41
spring.jlib=spring.jar,spring-agent.jar,spring-test.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar
(-)eclipselink.jpa.test/build.properties (+3 lines)
Lines 62-67 Link Here
62
oracle.spatial.lib=sdoapi.jar
62
oracle.spatial.lib=sdoapi.jar
63
oracle.xdb.lib=xdb.jar
63
oracle.xdb.lib=xdb.jar
64
oracle.xmlparserv2.lib=xmlparserv2.jar
64
oracle.xmlparserv2.lib=xmlparserv2.jar
65
spring.jlib.dir=../../../extension.lib.external/spring
66
spring.jlib=spring.jar,spring-agent.jar,cglib-nodep-2.1_3.jar,commons-logging.jar,xapool.jar,jotm-client.jar
67
eclipselink.jpa.spring.test=../eclipselink.jpa.spring.test
65
68
66
eclipselink.tests.jar=eclipselink-tests.jar
69
eclipselink.tests.jar=eclipselink-tests.jar
67
70
(-)eclipselink.jpa.test/build.xml (+81 lines)
Lines 134-139 Link Here
134
        <contains string="${server.name}" substring="weblogic"/>
134
        <contains string="${server.name}" substring="weblogic"/>
135
    </condition>
135
    </condition>
136
136
137
    <!-- This checks if running against Spring -->
138
    <condition property="is.spring">
139
        <contains string="${server.name}" substring="spring"/>
140
    </condition>
137
    <!-- This checks if the Apllication Server is applicable to run oracle jpa/customfeatures model on oracle db-->
141
    <!-- This checks if the Apllication Server is applicable to run oracle jpa/customfeatures model on oracle db-->
138
    <condition property="run.jpa.customfeatures.model">
142
    <condition property="run.jpa.customfeatures.model">
139
        <and>
143
        <and>
Lines 201-206 Link Here
201
        <echo message="coretest.classes='${eclipselink.core.test.dir}/${classes.dir}'"/>
205
        <echo message="coretest.classes='${eclipselink.core.test.dir}/${classes.dir}'"/>
202
206
203
        <path id="compile.path">
207
        <path id="compile.path">
208
            <fileset
209
                dir="${spring.jlib.dir}"
210
                includes="${spring.jlib}"/>
204
            <pathelement path="${eclipselink.core.dir}/${classes.dir}"/>
211
            <pathelement path="${eclipselink.core.dir}/${classes.dir}"/>
205
            <pathelement path="${eclipselink.jpa}/${classes.dir}"/>
212
            <pathelement path="${eclipselink.jpa}/${classes.dir}"/>
206
            <pathelement path="${eclipselink.core.test.dir}/${classes.dir}"/>
213
            <pathelement path="${eclipselink.core.test.dir}/${classes.dir}"/>
Lines 317-322 Link Here
317
                <path refid="compile.path"/>
324
                <path refid="compile.path"/>
318
            </classpath>
325
            </classpath>
319
        </javac>
326
        </javac>
327
        <javac srcdir="${eclipselink.jpa.spring.test}/${src.dir}"
328
               destdir="${eclipselink.jpa.test}/${classes.dir}"
329
               debug="${javac.debug}"
330
               debuglevel="${javac.debuglevel}"
331
               optimize="${javac.optimize}"
332
               source="${javac.version}"
333
               target="${javac.version}"
334
               deprecation="${javac.deprecation}"
335
               failonerror="true">
336
            <include name="org/eclipse/persistence/testing/framework/server/**"/>
337
            <classpath>
338
                <path refid="compile.path"/>
339
            </classpath>
340
        </javac>
320
    </target>
341
    </target>
321
342
322
    <target name="compile-criteria" if="modelgen.created.classes.exist">
343
    <target name="compile-criteria" if="modelgen.created.classes.exist">
Lines 348-353 Link Here
348
        </jar>
369
        </jar>
349
    </target>
370
    </target>
350
371
372
    <!-- Copy Spring specified ***spring.xml, appContext.properties and persistence.xml to default build location-->
373
    <target name="prepare-spring-xmls" depends="init, config-trunk, config-flat" if="is.spring">
374
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}">
375
            <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="appContext.properties"/>
376
        </copy>
377
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbURL%%' value="${db.url}">
378
            <include name="appContext.properties"/>
379
        </replace>
380
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%driverClass%%' value="${db.driver}">
381
            <include name="appContext.properties"/>
382
        </replace>
383
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbUser%%' value="${db.user}">
384
            <include name="appContext.properties"/>
385
        </replace>
386
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPassword%%' value="${db.pwd}">
387
            <include name="appContext.properties"/>
388
        </replace>
389
        <replace dir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}" token='%%dbPlatform%%' value="${db.platform}">
390
            <include name="appContext.properties"/>
391
        </replace>
392
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}/META-INF" overwrite="true">
393
            <fileset dir="${eclipselink.jpa.test}/${resource.dir}/${MODEL_NAME}/spring" includes="persistence.xml"/>
394
        </copy>
395
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${MODEL_NAME}">
396
            <fileset dir="${eclipselink.jpa.spring.test}/resource/jpa-spring" includes="**spring.xml"/>
397
        </copy>
398
    </target>
399
351
    <target name="package-annotation" depends="">
400
    <target name="package-annotation" depends="">
352
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}/META-INF">
401
        <copy todir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}/META-INF">
353
            <fileset dir="${eclipselink.jpa.test}/resource/${eclipselink.annotation.model}" includes="*.xml"/>
402
            <fileset dir="${eclipselink.jpa.test}/resource/${eclipselink.annotation.model}" includes="*.xml"/>
Lines 364-369 Link Here
364
                               org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**
413
                               org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**
365
                               org/eclipse/persistence/testing/models/weaving/**"/>
414
                               org/eclipse/persistence/testing/models/weaving/**"/>
366
        </copy>
415
        </copy>
416
        <antcall target="prepare-spring-xmls" inheritRefs="true">
417
            <param name="MODEL_NAME" value="${eclipselink.annotation.model}"/>
418
        </antcall>
367
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.annotation.model}.jar">
419
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.annotation.model}.jar">
368
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}">
420
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.annotation.model}">
369
            </fileset>
421
            </fileset>
Lines 471-476 Link Here
471
            <fileset dir="${eclipselink.jpa.test}/${classes.dir}"
523
            <fileset dir="${eclipselink.jpa.test}/${classes.dir}"
472
                     includes="org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**"/>
524
                     includes="org/eclipse/persistence/testing/models/jpa/fieldaccess/advanced/**"/>
473
        </copy>
525
        </copy>
526
        <antcall target="prepare-spring-xmls" inheritRefs="true">
527
            <param name="MODEL_NAME" value="${eclipselink.advanced.field.access.model}"/>
528
        </antcall>
474
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.advanced.field.access.model}.jar">
529
        <jar jarfile="${eclipselink.jpa.test}/${eclipselink.advanced.field.access.model}.jar">
475
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.advanced.field.access.model}">
530
            <fileset dir="${eclipselink.jpa.test}/${build.dir}/${eclipselink.advanced.field.access.model}">
476
            </fileset>
531
            </fileset>
Lines 613-618 Link Here
613
            <pathelement path="${eclipselink.extension.oracle.test.dir}/${eclipselink.jpa.oracle}-tests.jar"/>
668
            <pathelement path="${eclipselink.extension.oracle.test.dir}/${eclipselink.jpa.oracle}-tests.jar"/>
614
            <pathelement path="${eclipselink.jpa.test}/${eclipselink.delimited.model}.jar"/>
669
            <pathelement path="${eclipselink.jpa.test}/${eclipselink.delimited.model}.jar"/>
615
            <pathelement path="${oracle.extensions.depend.dir}/${oracle.spatial.lib}"/>
670
            <pathelement path="${oracle.extensions.depend.dir}/${oracle.spatial.lib}"/>
671
            <fileset
672
                dir="${spring.jlib.dir}"
673
                includes="${spring.jlib}"/>
616
        </path>
674
        </path>
617
        <path id="run.extended.classpath">
675
        <path id="run.extended.classpath">
618
            <pathelement path="${eclipselink.jpa.test}/${classes.dir}"/>
676
            <pathelement path="${eclipselink.jpa.test}/${classes.dir}"/>
Lines 933-938 Link Here
933
        </java>
991
        </java>
934
    </target>
992
    </target>
935
993
994
    <!-- Runs jpa srg test on Spring. -->
995
    <target name="test-spring-srg" depends="clean-test, config-trunk, config-flat">
996
        <antcall target="run-test" inheritRefs="true">
997
            <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.fieldaccess.advanced.FAServerTestSuite"/>
998
            <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/>
999
            <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/>
1000
            <param name="ORM_TESTING" value="-Dorm.testing=jpa"/>
1001
            <param name="RUN_PATH" value="run.classpath"/>
1002
            <param name="DB_URL" value="${db.url}"/>
1003
            <param name="TEST_SERVER_PLATFORM" value="org.eclipse.persistence.testing.framework.server.SpringPlatform"/>
1004
        </antcall>
1005
        <antcall target="run-test" inheritRefs="true">
1006
            <param name="TEST_CLASS" value="org.eclipse.persistence.testing.tests.jpa.advanced.EntityManagerJUnitTestSuite"/>
1007
            <param name="TEST_AGENT" value="-javaagent:../${spring.jlib.dir}/spring-agent.jar"/>
1008
            <param name="TEST_WEAVING" value="-DTEST_NO_WEAVING=true"/>
1009
            <param name="ORM_TESTING" value="-Dorm.testing=jpa"/>
1010
            <param name="RUN_PATH" value="run.classpath"/>
1011
            <param name="DB_URL" value="${db.url}"/>
1012
            <param name="TEST_SERVER_PLATFORM" value="org.eclipse.persistence.testing.framework.server.SpringPlatform"/>
1013
        </antcall>
1014
        <antcall target="generate-report" inheritRefs="true"/>
1015
    </target>
936
    <!-- Generic target for running tests. -->
1016
    <!-- Generic target for running tests. -->
937
    <target name="run-test" depends="config-trunk, config-flat">
1017
    <target name="run-test" depends="config-trunk, config-flat">
938
        <echo>Running test on ${DB_URL}</echo>
1018
        <echo>Running test on ${DB_URL}</echo>
Lines 947-952 Link Here
947
        </condition>
1027
        </condition>
948
1028
949
        <junit printsummary="yes" haltonfailure="yes" fork="yes" showoutput="true" maxmemory="512m" dir="${eclipselink.jpa.test}/${run.dir}">
1029
        <junit printsummary="yes" haltonfailure="yes" fork="yes" showoutput="true" maxmemory="512m" dir="${eclipselink.jpa.test}/${run.dir}">
1030
            <sysproperty key="TEST_SERVER_PLATFORM" value="${TEST_SERVER_PLATFORM}"/>
950
            <sysproperty key="proxy.user.name" value="${oracle.proxy.user}"/>
1031
            <sysproperty key="proxy.user.name" value="${oracle.proxy.user}"/>
951
            <jvmarg value="${TEST_AGENT}"/>
1032
            <jvmarg value="${TEST_AGENT}"/>
952
            <jvmarg value="${TEST_WEAVING}"/>
1033
            <jvmarg value="${TEST_WEAVING}"/>

Return to bug 290065