@@ -5,138 +5,123 @@ template: page.html
5
5
6
6
## Install Guide for Java EE
7
7
8
- MVC is an extension to JAX-RS, Ozark can be run on most application servers without
9
- any configuration. You will need to include the MVC-Spec as well as the Ozark module
8
+ MVC is built on top of JAX-RS. This means that Ozark can be run on most application servers without
9
+ any additional configuration. You will just need to include the MVC API JAR as well as the Ozark module
10
10
for the JAX-RS implementation shipped with your application server.
11
11
12
- Ozark requires at least the Java- EE 7 Web-Profile or the Eclipse MicroProfile.
12
+ Ozark requires at least the Java EE 8 Web-Profile or the Eclipse MicroProfile.
13
13
14
- ### Glassfish/Payara
14
+ Note: The MVC specification and Ozark are under active development. Therefore, you will have to add
15
+ the Sonatype OSS snapshot repository to your POM to get the latest and greatest version.
16
+ Please refer to [ Setting up the snapshot repository] ( install-snapshots.html ) for details.
15
17
16
- Glassfishes comes with Jersey as its JAX-RS implementation. Please add the following
17
- dependencies to your application:
18
+ ### Required dependencies
19
+
20
+ The dependencies you need to add to your ` pom.xml ` file depend on which application server
21
+ your are using.
22
+
23
+ #### Glassfish/Payara
24
+
25
+ Glassfish comes with Jersey as its JAX-RS implementation. Please add the following dependencies
26
+ to your application:
18
27
19
28
``` xml
20
29
<dependency >
21
30
<groupId >javax.mvc</groupId >
22
31
<artifactId >javax.mvc-api</artifactId >
23
- <version >1.0-SNAPSHOT </version >
32
+ <version >{{versions.spec.develop}} </version >
24
33
</dependency >
25
34
<dependency >
26
35
<groupId >org.mvc-spec.ozark</groupId >
27
36
<artifactId >ozark-jersey</artifactId >
28
- <version >1.0.0-m03-SNAPSHOT </version >
37
+ <version >{{versions.ozark.develop}} </version >
29
38
</dependency >
30
39
```
31
40
32
41
### Wildfly and JBoss EAP
33
42
34
- Wildfly uses RestEasy for JAX-RS. You need to include the following dependencies :
43
+ Wildfly is using RESTEasy for JAX-RS. So you need to Ozark RESTEasy integration module :
35
44
36
45
``` xml
37
46
<dependency >
38
47
<groupId >javax.mvc</groupId >
39
48
<artifactId >javax.mvc-api</artifactId >
40
- <version >1.0-SNAPSHOT </version >
49
+ <version >{{versions.spec.develop}} </version >
41
50
</dependency >
42
51
<dependency >
43
52
<groupId >org.mvc-spec.ozark</groupId >
44
53
<artifactId >ozark-resteasy</artifactId >
45
- <version >1.0.0-m03-SNAPSHOT </version >
54
+ <version >{{versions.ozark.develop}} </version >
46
55
</dependency >
47
56
```
48
57
49
58
### Wildfly Swarm
50
59
51
- We currently don't have a dedicated fraction for wildfly swarm , but you can use the
52
- JAX-RS fraction with the dependencies from wildfly section above :
60
+ We currently don't have a dedicated fraction for wildfly Swarm , but you can use the
61
+ JAX-RS fraction and add the same dependencies as required for Wildfly :
53
62
54
63
``` xml
55
- <!-- WildFly Swarm Fractions -->
56
64
<dependency >
57
65
<groupId >org.wildfly.swarm</groupId >
58
66
<artifactId >jaxrs</artifactId >
59
67
</dependency >
60
68
<dependency >
61
69
<groupId >javax.mvc</groupId >
62
70
<artifactId >javax.mvc-api</artifactId >
63
- <version >1.0-SNAPSHOT </version >
71
+ <version >{{versions.spec.develop}} </version >
64
72
</dependency >
65
73
<dependency >
66
74
<groupId >org.mvc-spec.ozark</groupId >
67
75
<artifactId >ozark-resteasy</artifactId >
68
- <version >1.0.0-m03-SNAPSHOT </version >
76
+ <version >{{versions.ozark.develop}} </version >
69
77
</dependency >
70
78
```
71
79
72
80
### Apache TomEE
73
81
74
- TomEE uses CXF as JAX-RS implementation. Right now there is no Ozark module for that.
82
+ Apache TomEE uses CXF as the JAX-RS implementation. Unfortunately there are some known bugs in CXF
83
+ which are causing trouble for Ozark. The latest CXF release should fix these issues, but Apache TomEE
84
+ currently ships with an older CXF release.
75
85
76
- To get around this, we'll demonstrate how to use it with the RestEasy module.
77
-
78
- The following pom.xml example that shows the dependency configuration:
86
+ If you want to give Ozark on Apache TomEE a try, add the following dependencies to your ` pom.xml ` :
79
87
80
88
``` xml
81
89
<dependency >
82
90
<groupId >javax.mvc</groupId >
83
91
<artifactId >javax.mvc-api</artifactId >
84
- <version >1.0-SNAPSHOT </version >
92
+ <version >{{versions.spec.develop}} </version >
85
93
</dependency >
86
94
<dependency >
87
95
<groupId >org.mvc-spec.ozark</groupId >
88
- <artifactId >ozark-resteasy </artifactId >
89
- <version >1.0.0-m03-SNAPSHOT </version >
96
+ <artifactId >ozark-core </artifactId >
97
+ <version >{{versions.ozark.develop}} </version >
90
98
</dependency >
99
+ ```
100
+
101
+ If using CXF with Ozark is causing trouble, you can also manually add RESTEasy to your application
102
+ and use this instead of CXF. To do so, use the following depndencies instead.
103
+
104
+ ``` xml
91
105
<dependency >
92
- <groupId >javax</groupId >
93
- <artifactId >javaee-web-api</artifactId >
94
- <version >7.0</version >
95
- <scope >provided</scope >
106
+ <groupId >javax.mvc</groupId >
107
+ <artifactId >javax.mvc-api</artifactId >
108
+ <version >{{versions.spec.develop}}</version >
96
109
</dependency >
97
110
<dependency >
98
- <groupId >org.jboss.resteasy </groupId >
99
- <artifactId >resteasy-cdi </artifactId >
100
- <version >3.1.4.Final </version >
111
+ <groupId >org.mvc-spec.ozark </groupId >
112
+ <artifactId >ozark-resteasy </artifactId >
113
+ <version >{{versions.ozark.develop}} </version >
101
114
</dependency >
102
115
<dependency >
103
- <groupId >org.jboss.resteasy</groupId >
104
- <artifactId >resteasy-servlet-initializer </artifactId >
105
- <version > 3.1.4.Final</version >
116
+ <groupId >org.jboss.resteasy</groupId >
117
+ <artifactId >resteasy-cdi </artifactId >
118
+ <version >3.1.4.Final</version >
106
119
</dependency >
107
120
<dependency >
108
- <groupId >org.hibernate </groupId >
109
- <artifactId >hibernate-validator </artifactId >
110
- <version >5.4.1 .Final</version >
121
+ <groupId >org.jboss.resteasy </groupId >
122
+ <artifactId >resteasy-servlet-initializer </artifactId >
123
+ <version >3.1.4 .Final</version >
111
124
</dependency >
112
125
```
113
- ### 3. Add the bean.xml,context.xml and web.xml file
114
- make sure to add an empty beans.xml file in your /resources/META-INF/ folder to your Web project:
115
-
116
- ``` xml
117
- <?xml version =" 1.0" ?>
118
- <beans xmlns =" http://xmlns.jcp.org/xml/ns/javaee"
119
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
120
- xsi : schemaLocation =" http://xmlns.jcp.org/xml/ns/javaee
121
- http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
122
- version =" 1.1" bean-discovery-mode =" all" >
123
- </beans >
124
- ```
125
- to finish create within /webapp/WEB-INF/ the web.xml file with the following content:
126
-
127
- ``` xml
128
- <?xml version =" 1.0" encoding =" UTF-8" ?>
129
- <web-app xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
130
- xmlns=" http://java.sun.com/xml/ns/javaee"
131
- xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee
132
- http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
133
- version=" 3.1" >
134
-
135
- <context-param >
136
- <!-- http://docs.jboss.org/resteasy/docs/3.1.4.Final/userguide/html_single/index.html#d4e143 -->
137
- <param-name >resteasy.injector.factory</param-name >
138
- <param-value >org.jboss.resteasy.cdi.CdiInjectorFactory</param-value >
139
- </context-param >
140
- </web-app >
141
- ```
142
126
127
+ That's all. Now you can start developing your first MVC 1.0 application.
0 commit comments