Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f8ed39e

Browse files
committed
Add Thorntail support
1 parent adff40a commit f8ed39e

File tree

18 files changed

+157
-32
lines changed

18 files changed

+157
-32
lines changed

‎cdi/dynamic-bean/src/test/java/org/javaee8/cdi/dynamic/bean/DynamicBeanTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static WebArchive deploy() {
2929
create(JavaArchive.class)
3030
.addClasses(CdiExtension.class, MyBean.class, MyBeanImpl.class)
3131
.addAsResource("META-INF/services/javax.enterprise.inject.spi.Extension"))
32-
.addAsManifestResource("beans.xml");
32+
.addAsWebInfResource("beans.xml");
3333
}
3434

3535
@Inject

‎jpa/pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,15 @@
2323
<version>${project.version}</version>
2424
</dependency>
2525
</dependencies>
26-
</project>
26+
<profiles>
27+
<profile>
28+
<id>thorntail</id>
29+
<dependencies>
30+
<dependency>
31+
<groupId>com.h2database</groupId>
32+
<artifactId>h2</artifactId>
33+
</dependency>
34+
</dependencies>
35+
</profile>
36+
</profiles>
37+
</project>

‎jsf/extensionless-mapping/src/main/java/org/javaee8/cdi/dynamic/bean/MappingInit.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
import javax.faces.webapp.FacesServlet;
77
import javax.servlet.ServletContextEvent;
88
import javax.servlet.ServletContextListener;
9-
import javax.servlet.annotation.WebListener;
109

1110
/**
1211
*
1312
* @author Arjan Tijms
1413
*/
15-
@WebListener
1614
public class MappingInit implements ServletContextListener {
1715

1816
@Override
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
5+
6+
<servlet>
7+
<servlet-name>Faces Servlet</servlet-name>
8+
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
9+
<load-on-startup>1</load-on-startup>
10+
</servlet>
11+
<servlet-mapping>
12+
<servlet-name>Faces Servlet</servlet-name>
13+
<url-pattern>*.jsf</url-pattern>
14+
</servlet-mapping>
15+
16+
<!-- We need to specify order in web.xml to ensure JSF impl initializes
17+
before MappingInit -->
18+
<listener>
19+
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
20+
</listener>
21+
<listener>
22+
<listener-class>org.javaee8.cdi.dynamic.bean.MappingInit</listener-class>
23+
</listener>
24+
</web-app>

‎jsf/extensionless-mapping/src/test/java/org/javaee8/cdi/dynamic/bean/ExtensionlessMappingTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public static WebArchive deploy() {
5151
.addAsWebResource(new File("src/main/webapp/foo.xhtml"))
5252
.addAsWebResource(new File("src/main/webapp/bar.xhtml"))
5353
.addAsWebResource(new File("src/main/webapp/sub/bar.xhtml"), "/sub/bar.xhtml")
54-
.addAsManifestResource("beans.xml");
54+
.addAsWebInfResource("beans.xml")
55+
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"));
5556

5657
System.out.println("War to be deployed contains: \n" + war.toString(true));
5758

‎jsonb/mapping/src/main/java/org/javaee8/jsonb/mapping/controller/PersonController.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
import org.javaee8.jsonb.mapping.domain.Person;
44
import java.util.Arrays;
55
import java.util.List;
6+
67
import javax.ws.rs.GET;
78
import javax.ws.rs.Path;
8-
9+
import javax.ws.rs.Produces;
10+
import javax.ws.rs.core.MediaType;
911
/**
1012
*
1113
* @author Gaurav Gupta
@@ -20,6 +22,7 @@ public class PersonController {
2022
*
2123
*/
2224
@GET
25+
@Produces(MediaType.APPLICATION_JSON)
2326
public List<Person> getAllPeople() {
2427
Person person1 = new Person();
2528
person1.setName("Ondrej");

‎pom.xml

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<payara.micro.version>5.183</payara.micro.version>
3030
<glassfish.version>5.0</glassfish.version>
3131
<tomcat.version>9.0.12</tomcat.version>
32+
<thorntail.version>2.3.0.Final</thorntail.version>
3233
</properties>
3334

3435
<repositories>
@@ -323,11 +324,6 @@
323324
<artifactId>maven-resources-plugin</artifactId>
324325
<version>3.0.2</version>
325326
</plugin>
326-
<plugin>
327-
<groupId>org.wildfly.plugins</groupId>
328-
<artifactId>wildfly-maven-plugin</artifactId>
329-
<version>1.0.2.Final</version>
330-
</plugin>
331327
</plugins>
332328
</build>
333329

@@ -843,6 +839,55 @@
843839
</build>
844840
</profile>
845841

842+
<!-- ### THORNTAIL ### -->
843+
844+
<profile>
845+
<id>thorntail</id>
846+
847+
<dependencyManagement>
848+
<dependencies>
849+
<dependency>
850+
<groupId>io.thorntail</groupId>
851+
<artifactId>bom</artifactId>
852+
<version>${thorntail.version}</version>
853+
<scope>import</scope>
854+
<type>pom</type>
855+
</dependency>
856+
</dependencies>
857+
</dependencyManagement>
858+
859+
<dependencies>
860+
861+
<!-- Java EE based client dependencies to contact a server via
862+
WebSocket or REST -->
863+
<dependency>
864+
<groupId>fish.payara.arquillian</groupId>
865+
<artifactId>payara-client-ee8</artifactId>
866+
</dependency>
867+
868+
<dependency>
869+
<groupId>io.thorntail</groupId>
870+
<artifactId>arquillian</artifactId>
871+
<scope>test</scope>
872+
</dependency>
873+
874+
</dependencies>
875+
876+
<build>
877+
<plugins>
878+
<plugin>
879+
<artifactId>maven-surefire-plugin</artifactId>
880+
<configuration>
881+
<systemPropertyVariables>
882+
<!-- Uncomment to debug -->
883+
<!--<thorntail.debug.port>8000</thorntail.debug.port> -->
884+
<arquillian.xml>arquillian-thorntail.xml</arquillian.xml>
885+
</systemPropertyVariables>
886+
</configuration>
887+
</plugin>
888+
</plugins>
889+
</build>
890+
</profile>
846891

847892

848893
<!-- Activate this profile to download javadoc and sources jars.

‎security/dynamic-rememberme/src/test/java/org/javaee8/security/dynamic/rememberme/DynamicRemembermeTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public static WebArchive createDeployment() {
4747
Servlet.class
4848
)
4949
.addPackage(
50-
RememberMeAnnotationLiteral.class.getPackage());
50+
RememberMeAnnotationLiteral.class.getPackage())
51+
.addAsWebInfResource("jboss-web.xml");
5152
}
5253

5354
@Before
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<jboss-web>
3+
<!-- JASPIC activation for Wildfly. -->
4+
<!-- See https://arjan-tijms.omnifaces.org/2015/08/activating-jaspic-in-jboss-wildfly.html -->
5+
<security-domain>jaspitest</security-domain>
6+
</jboss-web>

‎security/jwt/src/test/java/org/javaee8/security/jwt/JwtTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public static WebArchive createDeployment() {
8383
.addPackage(JWTCredential.class.getPackage())
8484
.addAsLibraries(jjwtFiles)
8585
.setWebXML("web.xml")
86-
.addAsWebInfResource("beans.xml");
86+
.addAsWebInfResource("beans.xml")
87+
.addAsWebInfResource("jboss-web.xml");
8788
}
8889

8990
@Before

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /