File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
datasourcedefinition-applicationxml-pu/src
test/java/org/javaee7/jpa/datasourcedefinition_applicationxml_pu Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 33 xsi : schemaLocation =" http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd"
44 version =" 7" >
55
6- <application-name >OrderApp</application-name >
7- <description >Application description</description >
8- <display-name >OrderApp</display-name >
9-
106 <module >
117 <web >
128 <web-uri >test.war</web-uri >
2016 <url >jdbc:h2:mem:test</url >
2117 </data-source >
2218
23-
2419</application >
Original file line number Diff line number Diff line change 1414import org .jboss .shrinkwrap .api .Archive ;
1515import org .jboss .shrinkwrap .api .spec .EnterpriseArchive ;
1616import org .jboss .shrinkwrap .api .spec .JavaArchive ;
17+ import org .jboss .shrinkwrap .api .spec .WebArchive ;
1718import org .jboss .shrinkwrap .resolver .api .maven .Maven ;
1819import org .junit .Test ;
1920import org .junit .runner .RunWith ;
@@ -58,8 +59,17 @@ public static Archive<?> deploy() {
5859 .addAsResource ("META-INF/persistence.xml" )
5960
6061 // Service class that uses persistence unit
61- .addPackages (true , DataSourceDefinitionApplicationXMLPuEJBTest .class .getPackage ())
62- );
62+ .addClasses (TestEntity .class , TestService .class )
63+ )
64+
65+ // Web module
66+ // This is needed to prevent Arquillian generating an illegal application.xml
67+ .addAsModule (
68+ create (WebArchive .class , "test.war" )
69+ // This class containing the test
70+ .addClass (DataSourceDefinitionApplicationXMLPuEJBTest .class )
71+
72+ );
6373 }
6474
6575 @ Test
Original file line number Diff line number Diff line change 1919 <module >datasourcedefinition</module >
2020 <module >datasourcedefinition-webxml-pu</module >
2121 <module >datasourcedefinition-annotation-pu</module >
22+ <module >datasourcedefinition-applicationxml-pu</module >
2223 <module >dynamic-named-query</module >
2324 <module >entitygraph</module >
2425 <module >listeners</module >
You can’t perform that action at this time.
0 commit comments