Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #17: Openfire 5.0.0 compatibility #20

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ <h1>
Candy Plugin Changelog
</h1>

<p><b>2.2.0 Release 6</b> -- (to be determined)</p>
<ul>
<li>Minimum Openfire requirement: 5.0.0</li>
<li>[<a href='https://github.com/igniterealtime/openfire-candy-plugin/issues/19'>#19</a>] - Properly report version number.</li>
<li>[<a href='https://github.com/igniterealtime/openfire-candy-plugin/issues/17'>#17</a>] - Compatibility with Openfire 5.0.0.</li>
</ul>

<p><b>2.2.0 Release 5</b> -- November 13, 2024</p>
<ul>
<li>Marked as last version to be compatible with Openfire versions prior to 5.0.0.</li>
Expand Down
6 changes: 2 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
<description>Adds the (third-party) Candy web client to Openfire.</description>
<author>Guus der Kinderen</author>
<version>${project.version}</version>
<date>2024-11-13</date>
<minServerVersion>4.7.0</minServerVersion>
<priorToServerVersion>5.0.0</priorToServerVersion>
<minJavaVersion>1.8</minJavaVersion>
<date>2024-11-19</date>
<minServerVersion>5.0.0</minServerVersion>
<adminconsole>
<tab id="tab-webclients" name="${admin.sidebar.webclients.name}" description="${admin.sidebar.webclients.description}" url="candy-config.jsp">
<sidebar id="tab-candy" name="${admin.sidebar.webclients.item.candy.name}" description="${admin.sidebar.webclients.item.candy.description}">
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.igniterealtime.openfire</groupId>
<version>4.7.0</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>candy</artifactId>
<name>Candy Webchat Plugin</name>
<version>2.2.0-release-6-SNAPSHOT</version>
<version>2.2.0.6-SNAPSHOT</version>

<build>
<sourceDirectory>src/java</sourceDirectory>
Expand All @@ -19,8 +19,8 @@
</plugin>
<!-- Compiles the Openfire Admin Console JSP pages. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jspc-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-jspc-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down
15 changes: 2 additions & 13 deletions src/java/org/igniterealtime/openfire/plugin/candy/CandyPlugin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017 Ignite Realtime Foundation. All rights reserved.
* Copyright (C) 2017-2024 Ignite Realtime Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,11 +15,7 @@
*/
package org.igniterealtime.openfire.plugin.candy;

import org.apache.tomcat.InstanceManager;
import org.apache.tomcat.SimpleInstanceManager;
import org.eclipse.jetty.apache.jsp.JettyJasperInitializer;
import org.eclipse.jetty.plus.annotation.ContainerInitializer;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.ee8.webapp.WebAppContext;
import org.jivesoftware.admin.AuthCheckFilter;
import org.jivesoftware.openfire.container.Plugin;
import org.jivesoftware.openfire.container.PluginManager;
Expand All @@ -29,7 +25,6 @@
import org.slf4j.LoggerFactory;

import java.io.File;
import java.util.*;

/**
* An Openfire plugin that integrates the Candy web client.
Expand Down Expand Up @@ -60,12 +55,6 @@ public void initializePlugin( PluginManager manager, File pluginDirectory )
context = new WebAppContext( null, pluginDirectory.getPath() + File.separator + "classes", "/candy" );
context.setClassLoader( this.getClass().getClassLoader() );

// Ensure the JSP engine is initialized correctly (in order to be able to cope with Tomcat/Jasper precompiled JSPs).
final List<ContainerInitializer> initializers = new ArrayList<>();
initializers.add( new ContainerInitializer( new JettyJasperInitializer(), null ) );
context.setAttribute("org.eclipse.jetty.containerInitializers", initializers);
context.setAttribute( InstanceManager.class.getName(), new SimpleInstanceManager());

HttpBindManager.getInstance().addJettyHandler( context );
}

Expand Down