Skip to content

Commit

Permalink
fixes igniterealtime#210: Update Jersey to 2.35
Browse files Browse the repository at this point in the history
Note that this change depends on OF-2352. This is _not_ in Openfire 4.7.0 beta (but should be merged before Openfire 4.7.0 is released).
  • Loading branch information
guusdk authored and mightymop committed Dec 23, 2021
1 parent 95e5b57 commit 469ef2a
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 150 deletions.
4 changes: 3 additions & 1 deletion changelog.html
Expand Up @@ -46,13 +46,15 @@ <h1>

<p><b>2.2.2</b> -- (tbd)</p>
<ul>
<li>Requires Openfire 4.7.0</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/125'>Issue #125</a>] - Combining keyword and date range makes search fail</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/163'>Issue #163</a>] - Migrate Jive Globals to System Properties</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/190'>Issue #190</a>] - Allow code-update to force a reindexation</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/192'>Issue #192</a>] - Combining keyword and participant(s) makes search fail</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/195'>Issue #195</a>] - Class incompatibility with latest OF MUC</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/200'>Issue #200</a>] - Remove references to deprecated logger methods</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/206'>Issue #206</a>] - Fixed auto-updates for 'Conversations' admin page</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/210'>Issue #210</a>] - Update Jersey library to 2.35</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/213'>Issue #213</a>] - Update iText library to 7.1.17</li>
</ul>

Expand All @@ -63,7 +65,7 @@ <h1>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/160'>Issue #160</a>] - Update JRobin</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/165'>Issue #165</a>] - Fix ordering of MAM results</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/167'>Issue #167</a>] - Deal with empty stanzas in db when processing MAM queries</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/174'>Issue #174</a>] - Upgrade jackson libraryto 2.12.1</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/174'>Issue #174</a>] - Upgrade jackson library to 2.12.1</li>
<li>[<a href='https://github.com/igniterealtime/openfire-monitoring-plugin/issues/175'>Issue #175</a>] - Fix database installation script for MySQL (bug introduced in 2.2.0 that affected new installations)</li>
</ul>

Expand Down
11 changes: 7 additions & 4 deletions classes/WEB-INF/web.xml
Expand Up @@ -5,13 +5,16 @@
version="3.1">

<servlet>
<servlet-name>JerseyWrapper</servlet-name>
<servlet-class>org.jivesoftware.openfire.plugin.JerseyWrapperPublic</servlet-class>
<servlet-name>JerseyApplicationPublic</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.jivesoftware.openfire.plugin.JerseyApplicationPublic</param-value>
</init-param>
</servlet>


<servlet-mapping>
<servlet-name>JerseyWrapper</servlet-name>
<servlet-name>JerseyApplicationPublic</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
</web-app>
33 changes: 11 additions & 22 deletions pom.xml
Expand Up @@ -14,8 +14,7 @@

<properties>
<jackson.version>2.12.1</jackson.version>
<!-- Consider moving to the org.glassfish.jersey set of artefacts -->
<jersey.version>1.19.4</jersey.version>
<jersey.version>2.35</jersey.version>
</properties>

<build>
Expand All @@ -34,29 +33,24 @@

<dependencies>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson.version}</version>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.4.0</version>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.jrobin</groupId>
Expand Down Expand Up @@ -89,11 +83,6 @@
<artifactId>orsonpdf</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>rome</groupId>
<artifactId>rome</artifactId>
<version>1.0</version>
</dependency>

<!-- For java 9+, see: https://stackoverflow.com/questions/51916221 -->
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
Expand Down
18 changes: 18 additions & 0 deletions src/java/org/jivesoftware/openfire/plugin/JerseyApplication.java
@@ -0,0 +1,18 @@
package org.jivesoftware.openfire.plugin;

import org.jivesoftware.openfire.plugin.service.MonitoringAPI;

import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;

public class JerseyApplication extends Application {

@Override
public Set<Class<?>> getClasses() {
final Set<Class<?>> s = new HashSet<>();
s.add(MonitoringAPI.class);
s.add(RESTExceptionMapper.class);
return s;
}
}
@@ -0,0 +1,18 @@
package org.jivesoftware.openfire.plugin;

import org.jivesoftware.openfire.plugin.service.LogAPI;

import javax.ws.rs.core.Application;
import java.util.HashSet;
import java.util.Set;

public class JerseyApplicationPublic extends Application {

@Override
public Set<Class<?>> getClasses() {
final Set<Class<?>> s = new HashSet<>();
s.add(LogAPI.class);
s.add(RESTExceptionMapper.class);
return s;
}
}
61 changes: 0 additions & 61 deletions src/java/org/jivesoftware/openfire/plugin/JerseyWrapper.java

This file was deleted.

59 changes: 0 additions & 59 deletions src/java/org/jivesoftware/openfire/plugin/JerseyWrapperPublic.java

This file was deleted.

10 changes: 7 additions & 3 deletions src/web/WEB-INF/web-custom.xml
Expand Up @@ -5,8 +5,12 @@
version="3.1">
<!-- Servlets -->
<servlet>
<servlet-name>JerseyWrapper</servlet-name>
<servlet-class>org.jivesoftware.openfire.plugin.JerseyWrapper</servlet-class>
<servlet-name>JerseyApplication</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.jivesoftware.openfire.plugin.JerseyApplication</param-value>
</init-param>
</servlet>

<servlet>
Expand All @@ -29,7 +33,7 @@
<url-pattern>/conversation</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>JerseyWrapper</servlet-name>
<servlet-name>JerseyApplication</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
</web-app>
Expand Down

0 comments on commit 469ef2a

Please sign in to comment.