SPARK-2132: Replace JxBrowser with Lobobrowser

This commit reverts back the change from Lobobrowser to JxBrowser, as we failed to get a license for JxBrowser.

As a result, the Meet plugin (which depends features not supported by Lobobrowser) was excluded from the Maven project.
This commit is contained in:
Guus der Kinderen
2020-08-02 22:44:08 +02:00
parent 7c8533dddb
commit b3131e3911
5 changed files with 74 additions and 103 deletions

View File

@ -179,27 +179,9 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.teamdev.jxbrowser</groupId> <groupId>org.lobobrowser</groupId>
<artifactId>jxbrowser-win</artifactId> <artifactId>LoboBrowser</artifactId>
<version>6.20</version> <version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-linux32</artifactId>
<version>6.14.2</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-linux64</artifactId>
<version>6.23.1</version>
</dependency>
<dependency>
<groupId>com.teamdev.jxbrowser</groupId>
<artifactId>jxbrowser-mac</artifactId>
<version>6.23.1</version>
</dependency> </dependency>
<dependency> <dependency>
@ -257,10 +239,6 @@
<id>ej-technologies</id> <id>ej-technologies</id>
<url>https://maven.ej-technologies.com/repository/</url> <url>https://maven.ej-technologies.com/repository/</url>
</repository> </repository>
<repository>
<id>com.teamdev</id>
<url>https://maven.teamdev.com/repository/products</url>
</repository>
</repositories> </repositories>
</project> </project>

View File

@ -16,71 +16,86 @@
package org.jivesoftware.spark.component.browser; package org.jivesoftware.spark.component.browser;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.net.MalformedURLException;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import com.teamdev.jxbrowser.chromium.*; import org.lobobrowser.gui.ContentEvent;
import com.teamdev.jxbrowser.chromium.swing.BrowserView; import org.lobobrowser.gui.ContentListener;
import org.lobobrowser.gui.FramePanel;
public class EmbeddedBrowserViewer extends BrowserViewer { public class EmbeddedBrowserViewer extends BrowserViewer implements ContentListener {
private static final long serialVersionUID = -8055149462713514766L; private static final long serialVersionUID = -8055149462713514766L;
private Browser browser; private FramePanel browser;
/**
* Constructs a new LobobrowserViewer
*/
public EmbeddedBrowserViewer() {
browser = new Browser();
}
/**
* Implementation of "Back"-button
*/
@Override
public void goBack() {
browser.goBack();
}
/** /**
* Initialization of the BrowserViewer * Constructs a new LobobrowserViewer
*/ */
@Override public EmbeddedBrowserViewer() {
public void initializeBrowser() { LookAndFeel laf = UIManager.getLookAndFeel();
this.setLayout(new BorderLayout());
final BrowserView view = new BrowserView( browser ); browser = new FramePanel();
this.add(view, BorderLayout.CENTER); //substance look and feel
} try {
UIManager.setLookAndFeel(laf);
}
catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
browser.addContentListener(this);
}
/** /**
* Load the given URL * Implementation of "Back"-button
*/ */
@Override public void goBack() {
public void loadURL(String url) { browser.back();
browser.loadURL( url ); }
}
// /** /**
// * React to an event by updating the address bar * Initialization of the BrowserViewer
// */ */
// public void contentSet(ContentEvent event) { public void initializeBrowser() {
// if (browser == null || browser.getCurrentNavigationEntry() == null) { this.setLayout(new BorderLayout());
// return; this.add(browser, BorderLayout.CENTER);
// } }
// String url = browser.getCurrentNavigationEntry().getUrl().toExternalForm();
// documentLoaded(url); /**
// } * Load the given URL
*/
public static void main(String[] args) { public void loadURL(String url) {
EmbeddedBrowserViewer viewer = new EmbeddedBrowserViewer(); try {
viewer.initializeBrowser(); browser.navigate(url);
JFrame frame = new JFrame("Test"); } catch (MalformedURLException e) {
e.printStackTrace();
}
}
/**
* React to an event by updating the address bar
*/
public void contentSet(ContentEvent event) {
if (browser == null || browser.getCurrentNavigationEntry() == null) {
return;
}
String url = browser.getCurrentNavigationEntry().getUrl().toExternalForm();
documentLoaded(url);
}
public static void main(String[] args) {
EmbeddedBrowserViewer viewer = new EmbeddedBrowserViewer();
viewer.initializeBrowser();
JFrame frame = new JFrame("Test");
frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().setLayout(new BorderLayout());
frame.getContentPane().add(viewer, BorderLayout.CENTER); frame.getContentPane().add(viewer, BorderLayout.CENTER);
frame.setVisible(true); frame.setVisible(true);
frame.pack(); frame.pack();
frame.setSize(600, 400); frame.setSize(600, 400);
viewer.loadURL("http://igniterealtime.org"); viewer.loadURL("http://igniterealtime.org");
} }
} }

View File

@ -576,12 +576,9 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" /> <entry location="lib/linux64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/linux" fileType="regular" /> <entry location="lib/linux" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" /> <entry location="bin/startup.bat" fileType="regular" />
@ -599,10 +596,8 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
@ -621,13 +616,10 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" /> <entry location="lib/linux64" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/linux" fileType="regular" /> <entry location="lib/linux" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/flashing.jar" fileType="regular" /> <entry location="plugins/flashing.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" /> <entry location="bin/startup.bat" fileType="regular" />
</exclude> </exclude>
@ -645,10 +637,8 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
@ -671,10 +661,8 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
@ -706,10 +694,8 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.120.jar" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
@ -740,13 +726,10 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-win-6.20.jar" fileType="regular" />
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" /> <entry location="lib/linux64" fileType="regular" />
<entry location="lib/windows" fileType="regular" /> <entry location="lib/windows" fileType="regular" />
<entry location="lib/windows64" fileType="regular" /> <entry location="lib/windows64" fileType="regular" />
<entry location="lib/linux" fileType="regular" /> <entry location="lib/linux" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/flashing.jar" fileType="regular" /> <entry location="plugins/flashing.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" /> <entry location="bin/startup.bat" fileType="regular" />
</exclude> </exclude>
@ -764,12 +747,9 @@
<excludedBeans /> <excludedBeans />
<overriddenPrincipalLanguage id="en" customLocalizationFile="" /> <overriddenPrincipalLanguage id="en" customLocalizationFile="" />
<exclude> <exclude>
<entry location="lib/jxbrowser-linux32-6.14.2.jar" fileType="regular" />
<entry location="lib/linux64" fileType="regular" /> <entry location="lib/linux64" fileType="regular" />
<entry location="lib/jxbrowser-mac-6.23.1.jar" fileType="regular" />
<entry location="lib/linux" fileType="regular" /> <entry location="lib/linux" fileType="regular" />
<entry location="lib/mac" fileType="regular" /> <entry location="lib/mac" fileType="regular" />
<entry location="lib/jxbrowser-linux64-6.23.1.jar" fileType="regular" />
<entry location="plugins/apple.jar" fileType="regular" /> <entry location="plugins/apple.jar" fileType="regular" />
<entry location="plugins/growl.jar" fileType="regular" /> <entry location="plugins/growl.jar" fileType="regular" />
<entry location="bin/startup.bat" fileType="regular" /> <entry location="bin/startup.bat" fileType="regular" />

View File

@ -17,8 +17,6 @@
package org.jivesoftware.spark.plugin.ofmeet; package org.jivesoftware.spark.plugin.ofmeet;
import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;
import org.jivesoftware.Spark; import org.jivesoftware.Spark;
import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.spark.SparkManager; import org.jivesoftware.spark.SparkManager;

View File

@ -77,7 +77,7 @@
<module>plugins/flashing</module> <module>plugins/flashing</module>
<module>plugins/growl</module> <module>plugins/growl</module>
<!--<module>plugins/jingle</module>--> <!--<module>plugins/jingle</module>-->
<module>plugins/meet</module> <!--<module>plugins/meet</module>-->
<!--<module>plugins/otr</module>--> <!--<module>plugins/otr</module>-->
<module>plugins/reversi</module> <module>plugins/reversi</module>
<module>plugins/roar</module> <module>plugins/roar</module>