Skip to content

Commit d6dcd5d

Browse files
committed
Fixed embedded Jetty profile (tests still failing in faces module.)
1 parent 8ffd330 commit d6dcd5d

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

‎pom.xml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,12 @@
281281
<artifactId>cdi-api</artifactId>
282282
<scope>test</scope>
283283
</dependency>
284+
<dependency>
285+
<groupId>org.glassfish</groupId>
286+
<artifactId>javax.faces</artifactId>
287+
<version>2.1.7</version>
288+
<scope>test</scope>
289+
</dependency>
284290
<dependency>
285291
<groupId>org.glassfish.web</groupId>
286292
<artifactId>el-impl</artifactId>

‎test-harness/src/main/java/org/ocpsoft/rewrite/test/RewriteTest.java‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ public static WebArchive getDeploymentNoWebXml()
5252

5353
public static WebArchive getDeploymentNoWebXml(String name)
5454
{
55-
if(isJetty() && "ROOT.war".equals(name))
55+
if (isJetty() && "ROOT.war".equals(name))
5656
name = ".war";
57-
57+
5858
WebArchive archive = ShrinkWrap
5959
.create(WebArchive.class, name)
6060
.addPackages(true, MockBinding.class.getPackage())
@@ -66,20 +66,12 @@ public static WebArchive getDeploymentNoWebXml(String name)
6666
// Jetty specific stuff
6767
if (isJetty()) {
6868

69-
archive.addAsLibraries(resolveDependencies("org.jboss.weld.servlet:weld-servlet"));
70-
7169
/*
7270
* Set the EL implementation
7371
*/
74-
archive.addAsLibraries(resolveDependencies("org.glassfish.web:el-impl"));
7572
archive.add(new StringAsset("com.sun.el.ExpressionFactoryImpl"),
7673
"/WEB-INF/classes/META-INF/services/javax.el.ExpressionFactory");
7774

78-
/*
79-
* Set the JSF implementation
80-
*/
81-
archive.addAsLibraries(resolveDependencies("org.glassfish:javax.faces"));
82-
8375
/*
8476
* Set up container configuration
8577
*/
@@ -88,13 +80,14 @@ public static WebArchive getDeploymentNoWebXml(String name)
8880
archive.addAsWebInfResource("jetty-log4j.xml", "log4j.xml");
8981

9082
}
91-
83+
9284
// Tomcat specific stuff
9385
if (isTomcat()) {
9486

9587
// setup Weld
9688
if (isWeld()) {
97-
archive.addAsLibraries(resolveDependencies("org.jboss.weld.servlet:weld-servlet"));
89+
archive.addAsLibraries(resolveDependencies("org.jboss.weld:weld-core"));
90+
archive.addAsLibraries(resolveDependencies("org.jboss.weld.servlet:weld-servlet-core"));
9891
archive.addAsWebResource("tomcat-weld-context.xml", "META-INF/context.xml");
9992
}
10093

@@ -162,7 +155,7 @@ protected static JavaArchive getContainerArchive()
162155
{
163156
archive.addAsManifestResource("jetty-web-fragment.xml", "web-fragment.xml");
164157
}
165-
158+
166159
if (isTomcat())
167160
{
168161
if (isWeld()) {
@@ -190,7 +183,7 @@ protected static JavaArchive getCurrentArchive()
190183
if (metaInf.exists())
191184
archive.addAsResource(metaInf);
192185
}
193-
186+
194187
return archive.addAsResource(new StringAsset("placeholder"), "README");
195188
}
196189

0 commit comments

Comments
 (0)