Skip to content

Commit

Permalink
Merge pull request jakartaee#1734 from jakartaee/web-jpa
Browse files Browse the repository at this point in the history
Web jpa
  • Loading branch information
scottmarlow authored Jan 9, 2025
2 parents 0e48431 + abde8d3 commit c23d96a
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 8 deletions.
114 changes: 108 additions & 6 deletions glassfish-runner/persistence-platform-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@
<!-- <glassfish.version>8.0.0-M5</glassfish.version> -->
<glassfish.toplevel.dir>glassfish8</glassfish.toplevel.dir>
<!-- Use JDK17 to run with GF 8.0.0-JDK17-M5 -->
<glassfish.version>8.0.0-JDK17-M9</glassfish.version>
<glassfish.version>8.0.0-JDK17-M5</glassfish.version>
<jakarta.persistence.jdbc.driver>org.apache.derby.jdbc.ClientDriver</jakarta.persistence.jdbc.driver>
<jakarta.persistence.jdbc.password>cts1</jakarta.persistence.jdbc.password>
<jakarta.persistence.jdbc.url>jdbc:derby://localhost:1527/derbyDB;create=true</jakarta.persistence.jdbc.url>
<jakarta.persistence.jdbc.user>cts1</jakarta.persistence.jdbc.user>
<jakarta.persistence.provider>org.eclipse.persistence.jpa.PersistenceProvider</jakarta.persistence.provider>
<jakarta.platform.version>11.0.0-M2</jakarta.platform.version>
<javadb.lib>${glassfish.home}/javadb/lib</javadb.lib>
<jdbc.classpath>${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyclient.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyshared.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbytools.jar</jdbc.classpath>
<jdbc.driver.classes>${javadb.lib}/derbyclient.jar:${javadb.lib}/derbyshared.jar:${javadb.lib}/derbytools.jar</jdbc.driver.classes>
<jdbc.url>jdbc:derby://localhost:1527/derbyDB;create=true</jdbc.url>

<junit.jupiter.version>5.11.3</junit.jupiter.version>
<tck.artifactId>persistence-platform-tck-tests</tck.artifactId>
Expand Down Expand Up @@ -362,12 +371,103 @@
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>arquillian-protocol-lib.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>jakarta.tck</groupId>
<artifactId>dbprocedures</artifactId>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>dbprocedures.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>start-database</id>
<goals>
<goal>exec</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>start-database</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>stop-database-final</id>
<goals>
<goal>exec</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<executable>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</executable>
<arguments>
<argument>stop-database</argument>
</arguments>
<successCodes>
<successCode>0</successCode>
<successCode>1</successCode>
</successCodes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>initdb</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<target>
<!-- <path id="jdbc.classpath">
<pathelement path="target/glassfish8/javadb/lib/derbyclient.jar"></pathelement>
<path refid="maven.runtime.classpath"></path>
</path> -->
<sql autocommit="true" classpath="${jdbc.classpath}" delimiter=";" driver="org.apache.derby.jdbc.ClientDriver" onerror="continue" password="cts1" url="${jdbc.url}" userid="cts1">
<transaction src="sql/derby/derby.ddl.persistence.sprocs.sql"></transaction>
<transaction src="sql/derby/derby.ddl.sql"></transaction>
</sql>
</target>
</configuration>
</execution>

<execution>
<id>install_java_procedures</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<target>
<path id="jdbc.classpath">
<pathelement path="${jdbc.driver.classes}"></pathelement>
<path refid="maven.runtime.classpath"></path>
</path>
<sql autocommit="true" classpath="${jdbc.classpath}" driver="${jakarta.persistence.jdbc.driver}" onerror="continue" password="${jakarta.persistence.jdbc.password}" url="${jakarta.persistence.jdbc.url}" userid="${jakarta.persistence.jdbc.user}">CALL sqlj.remove_jar('APP.dbprocedures', 0);
CALL sqlj.install_jar('${project.build.directory}/dbprocedures.jar', 'APP.dbprocedures', 0);
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath', 'APP.dbprocedures');</sql>
</target>
</configuration>
</execution>

</executions>
</plugin>

<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.0</version>
Expand All @@ -376,19 +476,19 @@
<dependenciesToScan>jakarta.tck:persistence-platform-tck-tests</dependenciesToScan>

<systemPropertyVariables>
<glassfish.enableDerby>true</glassfish.enableDerby>
<!-- <glassfish.enableDerby>true</glassfish.enableDerby>
<glassfish.derbyDatabaseName>${glassfish.home}/glassfish/domains/domain1/config/derbyDB;create=true</glassfish.derbyDatabaseName>
<glassfish.derbySQLFile>${basedir}/sql/derby/derby.ddl.sql</glassfish.derbySQLFile>
<glassfish.derbyUser>cts1</glassfish.derbyUser>
<glassfish.derbyPasswordFile>${basedir}/sql/derby/password.txt</glassfish.derbyPasswordFile>
<glassfish.derbyPasswordFile>${basedir}/sql/derby/password.txt</glassfish.derbyPasswordFile> -->

<glassfish.home>${project.build.directory}/${glassfish.toplevel.dir}</glassfish.home>
<glassfish.postBootCommands>set server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true
create-file-user --groups guest --passwordfile ${project.basedir}/javajoe.pass javajoe
create-file-user --groups staff:mgr --passwordfile ${project.basedir}/j2ee.pass j2ee
create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property DatabaseName=${glassfish.home}/glassfish/domains/domain1/config/derbyDB:serverName=localhost:portNumber=1527:user=cts1:password=cts1 --steadypoolsize 32 --maxpoolsize 64 cts-derby-pool
create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property DatabaseName=${glassfish.home}/glassfish/domains/domain1/config/derbyDB:serverName=localhost:PortNumber=1527:User=cts1:Password=cts1 --steadypoolsize 32 --maxpoolsize 64 cts-derby-pool_no_tx
create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property DatabaseName=derbyDB:serverName=localhost:PortNumber=1527:User=cts1:Password=cts1 --steadypoolsize 32 --maxpoolsize 64 cts-derby-pool
create-jdbc-resource --connectionpoolid cts-derby-pool jdbc/DB1
create-jdbc-connection-pool --restype javax.sql.DataSource --datasourceclassname org.apache.derby.jdbc.ClientDataSource --property DatabaseName=derbyDB:serverName=localhost:PortNumber=1527:User=cts1:Password=cts1 --steadypoolsize 32 --maxpoolsize 64 cts-derby-pool_no_tx
create-jdbc-resource --connectionpoolid cts-derby-pool_no_tx jdbc/DB_no_tx
list-jdbc-connection-pools
list-jdbc-resources
Expand Down Expand Up @@ -446,7 +546,9 @@
</goals>
<configuration>
<includes>
<include>ee/jakarta/tck/persistence/**/*Test.java</include>

<include>ee/jakarta/tck/persistence/core/StoredProcedureQuery/Client1PmservletTest.java</include>
<!--include>ee/jakarta/tck/persistence/**/*Test.java</include-->
</includes>
<!-- Select the @Tag("tck-javatest") tests -->
<groups>tck-javatest</groups>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public void setup(String[] args, Properties p) throws Exception {

super.setup(args, p);
removeTestData();
logTrace("removeTestData done");
createEmployeeTestData();
logTrace("createEmployeeTestData done");
dataBaseName = p.getProperty("jdbc.db");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void setup(String[] args, Properties p) throws Exception {
logTrace( "setup");

super.setup(args,p);
removeTestData();
createEmployeeTestData();
//removeTestData();
//createEmployeeTestData();
dataBaseName = p.getProperty("jdbc.db");

}
Expand Down

0 comments on commit c23d96a

Please sign in to comment.