Skip to content

Commit 2ba8bd9

Browse files
committed
Cleanup for old Wildfly Jersey guide
1 parent 9fc9ac5 commit 2ba8bd9

File tree

1 file changed

+83
-71
lines changed

1 file changed

+83
-71
lines changed

src/ozark/docs/install-wildfly-jersey.md

Lines changed: 83 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -5,85 +5,97 @@ template: page.html
55

66
## Install Guide for Wildfly
77

8-
The MVC implementation Ozark is based on Jersey. This makes is a little bit tricky to get MVC running on Wildfly, because Wildfly provides with ReastEasy a competing JAX-RS implementation.
9-
10-
To get Ozark running together with Wildfly first you need to add the Ozark implementation together with the Jersey Dependencies to your project. The the following pom.xml example showing the dependency configuration:
11-
12-
....
13-
<dependencies>
14-
<!-- JEE Dependencies -->
15-
<dependency>
16-
<groupId>javax</groupId>
17-
<artifactId>javaee-api</artifactId>
18-
<version>7.0</version>
19-
<scope>provided</scope>
20-
</dependency>
21-
<!-- MVC Dependencies -->
22-
<dependency>
23-
<groupId>javax.mvc</groupId>
24-
<artifactId>javax.mvc-api</artifactId>
25-
<version>1.0-edr2</version>
26-
</dependency>
27-
<dependency>
28-
<groupId>org.glassfish.ozark</groupId>
29-
<artifactId>ozark</artifactId>
30-
<version>1.0.0-m02</version>
31-
</dependency>
32-
<dependency>
33-
<groupId>org.glassfish.jersey.containers</groupId>
34-
<artifactId>jersey-container-servlet</artifactId>
35-
<version>2.23.1</version>
36-
</dependency>
37-
<dependency>
38-
<groupId>org.glassfish.jersey.ext.cdi</groupId>
39-
<artifactId>jersey-cdi1x</artifactId>
40-
<version>2.23.1</version>
41-
</dependency>
42-
<dependency>
43-
<groupId>org.glassfish.jersey.ext</groupId>
44-
<artifactId>jersey-bean-validation</artifactId>
45-
<version>2.23.1</version>
46-
<exclusions>
47-
<exclusion>
48-
<groupId>org.hibernate</groupId>
49-
<artifactId>hibernate-validator</artifactId>
50-
</exclusion>
51-
</exclusions>
52-
</dependency>
53-
....
54-
</dependencies>
55-
....
56-
57-
The important part here is to deactivate the jersey hibernate-validation. This can be don with the ‘exclusion’ tag of maven.
58-
59-
In the next step you need to provide two wildfly deployment descriptors to ensure that the RestEasy Subsystem is deactivated.
8+
Note: This guide is not relevant any more. Today Ozark supports Wildfly using the RESTEasy integration module.
9+
However, we decided to keep this guide alive.
10+
11+
The MVC implementation Ozark is based on Jersey. This makes is a little bit tricky to get MVC running on Wildfly, because Wildfly provides with RESTEasy, a competing JAX-RS implementation.
12+
13+
To get Ozark running together with Wildfly first you need to add the Ozark implementation together with the Jersey dependencies to your project. The the following `pom.xml` example showing the dependency configuration:
14+
15+
```xml
16+
<!-- Java EE dependencies -->
17+
<dependency>
18+
<groupId>javax</groupId>
19+
<artifactId>javaee-api</artifactId>
20+
<version>7.0</version>
21+
<scope>provided</scope>
22+
</dependency>
23+
24+
<!-- MVC dependencies -->
25+
<dependency>
26+
<groupId>javax.mvc</groupId>
27+
<artifactId>javax.mvc-api</artifactId>
28+
<version>1.0-edr2</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.glassfish.ozark</groupId>
32+
<artifactId>ozark</artifactId>
33+
<version>1.0.0-m02</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>org.glassfish.jersey.containers</groupId>
37+
<artifactId>jersey-container-servlet</artifactId>
38+
<version>2.23.1</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.glassfish.jersey.ext.cdi</groupId>
42+
<artifactId>jersey-cdi1x</artifactId>
43+
<version>2.23.1</version>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.glassfish.jersey.ext</groupId>
47+
<artifactId>jersey-bean-validation</artifactId>
48+
<version>2.23.1</version>
49+
<exclusions>
50+
<exclusion>
51+
<groupId>org.hibernate</groupId>
52+
<artifactId>hibernate-validator</artifactId>
53+
</exclusion>
54+
</exclusions>
55+
</dependency>
56+
```
57+
58+
The important part here is to deactivate Jersey hibernate-validation. This can be don with the ‘exclusion’ tag of maven.
59+
60+
In the next step you need to provide two Wildfly deployment descriptors to ensure that the RESTEasy subsystem is deactivated.
6061

6162
### 1. Deactivate Wildfly JAX-RS RestEasy Subsystem
62-
To deactivate RestEasy add the file "*jboss-deployment-structure.xml*" into the WEB-INF-folder with the following content:
6363

64-
<?xml version="1.0" encoding="UTF-8"?>
65-
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
66-
<deployment>
67-
<exclude-subsystems>
68-
<subsystem name="jaxrs" />
69-
</exclude-subsystems>
70-
</deployment>
71-
</jboss-deployment-structure>
64+
To deactivate RESTEasy add the file `*jboss-deployment-structure.xml*` into the WEB-INF folder with the following content:
65+
66+
```xml
67+
<?xml version="1.0" encoding="UTF-8"?>
68+
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
69+
<deployment>
70+
<exclude-subsystems>
71+
<subsystem name="jaxrs" />
72+
</exclude-subsystems>
73+
</deployment>
74+
</jboss-deployment-structure>
75+
```
7276

7377
### 2. Prevent implizit bean archives without beans.xml
74-
To deactivate bean archives with a beans.xml add the file "*jboss-all.xml*" into the Web-INF folder with the following content:
7578

76-
<jboss xmlns="urn:jboss:1.0">
77-
<weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
78-
</jboss>
79+
To deactivate bean archives with a beans.xml add the file `*jboss-all.xml*` into the WEB-INF folder with
80+
the following content:
81+
82+
```xml
83+
<jboss xmlns="urn:jboss:1.0">
84+
<weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
85+
</jboss>
86+
```
7987

8088
See also: https://docs.jboss.org/author/display/WFLY8/CDI+Reference
8189

8290
### 3. Add the bean.xml file
83-
Finally make sure that your web project contain an empty beans.xml file in the WEB-INF folder:
8491

85-
<?xml version="1.0"?>
86-
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
87-
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
88-
version="1.1" bean-discovery-mode="all">
89-
</beans>
92+
Finally make sure that your web project contain an empty `beans.xml` file in the WEB-INF folder:
93+
94+
```xml
95+
<?xml version="1.0"?>
96+
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
97+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
98+
version="1.1" bean-discovery-mode="all">
99+
100+
</beans>
101+
```

0 commit comments

Comments
 (0)