Skip to content

Commit

Permalink
Fix remaining web profile tests using an EAR artifact.
Browse files Browse the repository at this point in the history
Fixes #1759

Signed-off-by: Scott M Stark <[email protected]>
  • Loading branch information
starksm64 committed Jan 15, 2025
1 parent d387095 commit 443a071
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 760 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class ClientPmservletTest extends ee.jakarta.tck.persistence.core.EntityG
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_EntityGraph_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_EntityGraph_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -143,28 +142,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_EntityGraph.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_EntityGraph_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_EntityGraph_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_EntityGraph_vehicles_ear.addAsModule(jpa_core_EntityGraph_pmservlet_vehicle_web);

jpa_core_EntityGraph_vehicles_ear.addAsLibrary(jpa_core_EntityGraph);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_EntityGraph_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_EntityGraph_vehicles_ear, Client.class, earResURL);
return jpa_core_EntityGraph_vehicles_ear;
jpa_core_EntityGraph_pmservlet_vehicle_web.addAsLibrary(jpa_core_EntityGraph);
return jpa_core_EntityGraph_pmservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client1PmservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -177,28 +176,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client1.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client1.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client4PmservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -176,28 +175,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client4.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client4.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client4PuservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_puservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_puservlet_vehicle_web.war");
Expand Down Expand Up @@ -176,28 +175,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_puservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client4.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client4.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_puservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_puservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client5PmservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -178,28 +177,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client5.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client5.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client6PmservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -176,28 +175,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client6.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client6.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web;
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.arquillian.junit5.ArquillianExtension;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.jupiter.api.MethodOrderer;
Expand Down Expand Up @@ -56,7 +55,7 @@ public class Client7PmservletTest extends ee.jakarta.tck.persistence.core.criter
@TargetsContainer("tck-javatest")
@OverProtocol("javatest")
@Deployment(name = VEHICLE_ARCHIVE, order = 2)
public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
public static WebArchive createDeploymentVehicle(@ArquillianResource TestArchiveProcessor archiveProcessor) {
// War
// the war with the correct archive name
WebArchive jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web = ShrinkWrap.create(WebArchive.class, "jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.war");
Expand Down Expand Up @@ -176,28 +175,8 @@ public static EnterpriseArchive createDeploymentVehicle(@ArquillianResource Test
jpa_core_criteriaapi_CriteriaQuery.addAsManifestResource(parURL, "orm.xml");
}

// Ear
EnterpriseArchive jpa_core_criteriaapi_CriteriaQuery_vehicles_ear = ShrinkWrap.create(EnterpriseArchive.class, "jpa_core_criteriaapi_CriteriaQuery_vehicles.ear");

// Any libraries added to the ear

// The component jars built by the package target
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsModule(jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web);

jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);



// The application.xml descriptor
URL earResURL = null;
// The sun-application.xml descriptor
earResURL = Client7.class.getResource("/.ear.sun-application.xml");
if(earResURL != null) {
jpa_core_criteriaapi_CriteriaQuery_vehicles_ear.addAsManifestResource(earResURL, "sun-application.xml");
}
// Call the archive processor
archiveProcessor.processEarArchive(jpa_core_criteriaapi_CriteriaQuery_vehicles_ear, Client7.class, earResURL);
return jpa_core_criteriaapi_CriteriaQuery_vehicles_ear;
jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web.addAsLibrary(jpa_core_criteriaapi_CriteriaQuery);
return jpa_core_criteriaapi_CriteriaQuery_pmservlet_vehicle_web;
}

@Test
Expand Down
Loading

0 comments on commit 443a071

Please sign in to comment.