diff --git a/build.gradle b/build.gradle index 992de41c6..be40f20fe 100644 --- a/build.gradle +++ b/build.gradle @@ -20,6 +20,7 @@ plugins { ext { java11Projects = [ + ':smack-examples', ':smack-integration-test', ':smack-omemo-signal-integration-test', ':smack-repl', @@ -119,6 +120,7 @@ allprojects { ':smack-omemo-signal', ].collect{ project(it) } gplLicensedProjects = [ + ':smack-examples', ':smack-omemo-signal', ':smack-omemo-signal-integration-test', ':smack-repl' diff --git a/config/checkstyle/smack-examples-gplv3-license-header.txt b/config/checkstyle/smack-examples-gplv3-license-header.txt new file mode 100644 index 000000000..3d9d392c4 --- /dev/null +++ b/config/checkstyle/smack-examples-gplv3-license-header.txt @@ -0,0 +1,20 @@ +/** + * + * Copyright 20XX John Doe + * + * This file is part of smack-examples. + * + * smack-examples is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ diff --git a/settings.gradle b/settings.gradle index 91c403b77..8a7fececc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,6 +6,7 @@ rootProject.name = 'Smack' include 'smack-core', 'smack-im', 'smack-tcp', + 'smack-examples', 'smack-extensions', 'smack-experimental', 'smack-debug', diff --git a/smack-examples/build.gradle b/smack-examples/build.gradle new file mode 100644 index 000000000..7592441a5 --- /dev/null +++ b/smack-examples/build.gradle @@ -0,0 +1,10 @@ +description = """\ +Examples and test applications for Smack""" + +dependencies { + // Smack's integration test framework (sintest) depends on + // smack-java*-full and since we may want to use parts of sinttest + // in smack-examples, we simply depend sinttest. + api project(':smack-integration-test') + api project(':smack-omemo-signal') +} diff --git a/smack-java8-full/src/main/java/org/jivesoftware/smack/full/BoshConnectionTest.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/BoshConnectionTest.java similarity index 65% rename from smack-java8-full/src/main/java/org/jivesoftware/smack/full/BoshConnectionTest.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/BoshConnectionTest.java index 4063c72ff..3d18c7365 100644 --- a/smack-java8-full/src/main/java/org/jivesoftware/smack/full/BoshConnectionTest.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/BoshConnectionTest.java @@ -2,19 +2,23 @@ * * Copyright 2022 Florian Schmaus. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * This file is part of smack-examples. * - * http://www.apache.org/licenses/LICENSE-2.0 + * smack-examples is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.jivesoftware.smack.full; +package org.igniterealtime.smack.examples; import java.io.IOException; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/DoX.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/DoX.java similarity index 94% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/DoX.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/DoX.java index 093a5aea9..cd3745437 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/DoX.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/DoX.java @@ -2,9 +2,9 @@ * * Copyright 2019 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.IOException; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/IoT.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java similarity index 98% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/IoT.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java index 66a968c31..12c74fb2a 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/IoT.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java @@ -2,9 +2,9 @@ * * Copyright 2016 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.util.Collections; import java.util.List; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/Nio.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/Nio.java similarity index 96% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/Nio.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/Nio.java index 09d296bb5..81ef164cb 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/Nio.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/Nio.java @@ -2,9 +2,9 @@ * * Copyright 2018-2021 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.BufferedWriter; import java.io.IOException; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/OmemoClient.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/OmemoClient.java similarity index 98% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/OmemoClient.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/OmemoClient.java index dc4b343e6..b247c77b2 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/OmemoClient.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/OmemoClient.java @@ -2,9 +2,9 @@ * * Copyright 2019 Paul Schaub * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.IOException; import java.nio.file.Files; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/TlsTest.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/TlsTest.java similarity index 96% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/TlsTest.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/TlsTest.java index 08bd25b6d..0e924fa9a 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/TlsTest.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/TlsTest.java @@ -2,9 +2,9 @@ * * Copyright 2016 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.IOException; import java.security.KeyManagementException; diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/WebSocketConnection.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java similarity index 95% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/WebSocketConnection.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java index f693fb739..9e4e5856f 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/WebSocketConnection.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java @@ -2,9 +2,9 @@ * * Copyright 2021 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.IOException; import java.net.URISyntaxException; diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmlStringBuilderTest.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmlStringBuilderTest.java new file mode 100644 index 000000000..b02e5cf81 --- /dev/null +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmlStringBuilderTest.java @@ -0,0 +1,118 @@ +/** + * + * Copyright 2023 Florian Schmaus + * + * This file is part of smack-examples. + * + * smack-examples is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package org.igniterealtime.smack.examples; + +import java.util.function.Supplier; + +import org.jivesoftware.smack.util.XmlStringBuilder; + +public class XmlStringBuilderTest { + static int COUNT_OUTER = 500; + static int COUNT_INNER = 50; + + public static void main(String[] args) throws Exception { + test1(); + test2(); + test3(); + } + + public static void test1() throws Exception { + // CHECKSTYLE:OFF + System.out.println("Test 1"); + // CHECKSTYLE:ON + XmlStringBuilder parent = new XmlStringBuilder(); + XmlStringBuilder child = new XmlStringBuilder(); + XmlStringBuilder child2 = new XmlStringBuilder(); + + for (int i = 1; i < COUNT_OUTER; i++) { + XmlStringBuilder cs = new XmlStringBuilder(); + for (int j = 0; j < COUNT_INNER; j++) { + cs.append("abc"); + } + child2.append((CharSequence) cs); + } + + child.append((CharSequence) child2); + parent.append((CharSequence) child); + + time("test1: parent", () -> "len=" + parent.toString().length()); + time("test1: child", () -> "len=" + child.toString().length()); + time("test1: child2", () -> "len=" + child2.toString().length()); + } + + public static void test2() throws Exception { + // CHECKSTYLE:OFF + System.out.println("Test 2: evaluate children first"); + // CHECKSTYLE:ON + XmlStringBuilder parent = new XmlStringBuilder(); + XmlStringBuilder child = new XmlStringBuilder(); + XmlStringBuilder child2 = new XmlStringBuilder(); + + for (int i = 1; i < COUNT_OUTER; i++) { + XmlStringBuilder cs = new XmlStringBuilder(); + for (int j = 0; j < COUNT_INNER; j++) { + cs.append("abc"); + } + child2.append((CharSequence) cs); + } + + child.append((CharSequence) child2); + parent.append((CharSequence) child); + + time("test2: child2", () -> "len=" + child2.toString().length()); + time("test2: child", () -> "len=" + child.toString().length()); + time("test2: parent", () -> "len=" + parent.toString().length()); + } + + public static void test3() throws Exception { + // CHECKSTYLE:OFF + System.out.println("Test 3: use append(XmlStringBuilder)"); + // CHECKSTYLE:ON + XmlStringBuilder parent = new XmlStringBuilder(); + XmlStringBuilder child = new XmlStringBuilder(); + XmlStringBuilder child2 = new XmlStringBuilder(); + + for (int i = 1; i < COUNT_OUTER; i++) { + XmlStringBuilder cs = new XmlStringBuilder(); + for (int j = 0; j < COUNT_INNER; j++) { + cs.append("abc"); + } + child2.append(cs); + } + + child.append(child2); + parent.append(child); + + time("test3: parent", () -> "len=" + parent.toString().length()); + time("test3: child", () -> "len=" + child.toString().length()); + time("test3: child2", () -> "len=" + child2.toString().length()); + } + + static void time(String name, Supplier block) { + long start = System.currentTimeMillis(); + String result = block.get(); + long end = System.currentTimeMillis(); + + // CHECKSTYLE:OFF + System.out.println(name + " took " + (end - start) + "ms: " + result); + // CHECKSTYLE:ONy + } +} diff --git a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/XmppTools.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java similarity index 97% rename from smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/XmppTools.java rename to smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java index eeb6c7a40..f262102c2 100644 --- a/smack-repl/src/main/java/org/igniterealtime/smack/smackrepl/XmppTools.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java @@ -2,9 +2,9 @@ * * Copyright 2016-2021 Florian Schmaus * - * This file is part of smack-repl. + * This file is part of smack-examples. * - * smack-repl is free software; you can redistribute it and/or modify + * smack-examples is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -package org.igniterealtime.smack.smackrepl; +package org.igniterealtime.smack.examples; import java.io.IOException; import java.security.KeyManagementException; diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/package-info.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/package-info.java new file mode 100644 index 000000000..ed3cf17e7 --- /dev/null +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/package-info.java @@ -0,0 +1,25 @@ +/** + * + * Copyright 2023 Florian Schmaus + * + * This file is part of smack-examples. + * + * smack-examples is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * Examples and tests for Smack. + */ +package org.igniterealtime.smack.examples; diff --git a/smack-examples/src/test/java/org/igniterealtime/smack/examples/SmackExamplesTest.java b/smack-examples/src/test/java/org/igniterealtime/smack/examples/SmackExamplesTest.java new file mode 100644 index 000000000..35aa7190d --- /dev/null +++ b/smack-examples/src/test/java/org/igniterealtime/smack/examples/SmackExamplesTest.java @@ -0,0 +1,33 @@ +/** + * + * Copyright 2023 Florian Schmaus + * + * This file is part of smack-examples. + * + * smack-examples is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +package org.igniterealtime.smack.examples; + +import org.junit.jupiter.api.Test; + +public class SmackExamplesTest { + /** + * Just here to ensure jacoco is not complaining. + */ + @Test + public void emptyTest() { + } + +} diff --git a/smack-java8-full/src/main/java/org/jivesoftware/smack/full/WebSocketConnectionTest.java b/smack-java8-full/src/main/java/org/jivesoftware/smack/full/WebSocketConnectionTest.java deleted file mode 100644 index 54c3d30d5..000000000 --- a/smack-java8-full/src/main/java/org/jivesoftware/smack/full/WebSocketConnectionTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * - * Copyright 2021 Florian Schmaus. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.jivesoftware.smack.full; - -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.Date; -import java.util.logging.Logger; - -import org.jivesoftware.smack.SmackConfiguration; -import org.jivesoftware.smack.SmackException; -import org.jivesoftware.smack.XMPPException; - -import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection; -import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnectionConfiguration; -import org.jivesoftware.smack.debugger.ConsoleDebugger; -import org.jivesoftware.smack.packet.Message; -import org.jivesoftware.smack.websocket.XmppWebSocketTransportModuleDescriptor; -import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; - -import org.jxmpp.util.XmppDateTime; - -public class WebSocketConnectionTest { - - static { - SmackConfiguration.DEBUG = true; - } - - public static void main(String[] args) - throws URISyntaxException, SmackException, IOException, XMPPException, InterruptedException { - String jid, password, websocketEndpoint, messageTo = null; - if (args.length < 3 || args.length > 4) { - throw new IllegalArgumentException(); - } - - jid = args[0]; - password = args[1]; - websocketEndpoint = args[2]; - if (args.length >= 4) { - messageTo = args[3]; - } - - testWebSocketConnection(jid, password, websocketEndpoint, messageTo); - } - - public static void testWebSocketConnection(String jid, String password, String websocketEndpoint) - throws URISyntaxException, SmackException, IOException, XMPPException, InterruptedException { - testWebSocketConnection(jid, password, websocketEndpoint, null); - } - - public static void testWebSocketConnection(String jid, String password, String websocketEndpoint, String messageTo) - throws URISyntaxException, SmackException, IOException, XMPPException, InterruptedException { - ModularXmppClientToServerConnectionConfiguration.Builder builder = ModularXmppClientToServerConnectionConfiguration.builder(); - builder.removeAllModules() - .setXmppAddressAndPassword(jid, password) - .setDebuggerFactory(ConsoleDebugger.Factory.INSTANCE) - ; - - XmppWebSocketTransportModuleDescriptor.Builder websocketBuilder = XmppWebSocketTransportModuleDescriptor.getBuilder(builder); - websocketBuilder.explicitlySetWebSocketEndpointAndDiscovery(websocketEndpoint, false); - builder.addModule(websocketBuilder.build()); - - ModularXmppClientToServerConnectionConfiguration config = builder.build(); - ModularXmppClientToServerConnection connection = new ModularXmppClientToServerConnection(config); - - connection.setReplyTimeout(5 * 60 * 1000); - - connection.addConnectionStateMachineListener((event, c) -> { - Logger.getAnonymousLogger().info("Connection event: " + event); - }); - - connection.connect(); - - connection.login(); - - if (messageTo != null) { - Message message = connection.getStanzaFactory().buildMessageStanza() - .to(messageTo) - .setBody("It is alive! " + XmppDateTime.formatXEP0082Date(new Date())) - .build() - ; - connection.sendStanza(message); - } - - Thread.sleep(1000); - - connection.disconnect(); - - ModularXmppClientToServerConnection.Stats connectionStats = connection.getStats(); - ServiceDiscoveryManager.Stats serviceDiscoveryManagerStats = ServiceDiscoveryManager.getInstanceFor(connection).getStats(); - - // CHECKSTYLE:OFF - System.out.println("WebSocket successfully finished, yeah!\n" + connectionStats + '\n' + serviceDiscoveryManagerStats); - // CHECKSTYLE:ON - } -} diff --git a/smack-repl/build.gradle b/smack-repl/build.gradle index 3267ccb0e..6e098eb52 100644 --- a/smack-repl/build.gradle +++ b/smack-repl/build.gradle @@ -13,11 +13,7 @@ ext { } dependencies { - // Smack's integration test framework (sintest) depends on - // smack-java*-full and since we may want to use parts of sinttest - // in the REPL, we simply depend sinttest. - api project(':smack-integration-test') - api project(':smack-omemo-signal') + api project(':smack-examples') implementation "org.scala-lang:scala-library:$scalaVersion" implementation "com.lihaoyi:ammonite_$scalaVersion:2.5.11"