diff --git a/build.gradle b/build.gradle index f3222e8f2a..6137e72270 100644 --- a/build.gradle +++ b/build.gradle @@ -539,8 +539,8 @@ project('spring-integration-xmpp') { dependencies { compile project(":spring-integration-core") compile("javax.activation:activation:$javaxActivationVersion") { optional = true } - compile "jivesoftware:smack:3.1.0" - compile "jivesoftware:smackx:3.1.0" + compile "org.igniterealtime.smack:smack:3.2.1" + compile "org.igniterealtime.smack:smackx:3.2.1" compile "org.springframework:spring-context-support:$springVersion" testCompile project(":spring-integration-test") testCompile project(":spring-integration-stream") diff --git a/spring-integration-xmpp/pom.xml b/spring-integration-xmpp/pom.xml index b42e415262..5e04c238f5 100644 --- a/spring-integration-xmpp/pom.xml +++ b/spring-integration-xmpp/pom.xml @@ -88,12 +88,6 @@ - - org.springframework.integration - spring-integration-stream - 2.1.0.BUILD-SNAPSHOT - test - org.springframework spring-context-support @@ -106,12 +100,6 @@ 3.0.7.RELEASE test - - org.springframework.integration - spring-integration-test - 2.1.0.BUILD-SNAPSHOT - test - org.springframework.integration spring-integration-core @@ -130,6 +118,18 @@ 1.2.12 test + + org.igniterealtime.smack + smackx + 3.2.1 + compile + + + org.springframework.integration + spring-integration-test + 2.1.0.BUILD-SNAPSHOT + test + org.easymock easymock @@ -149,30 +149,30 @@ compile true - - jivesoftware - smack - 3.1.0 - compile - - - jivesoftware - smackx - 3.1.0 - compile - org.hamcrest hamcrest-all 1.1 test + + org.springframework.integration + spring-integration-stream + 2.1.0.BUILD-SNAPSHOT + test + org.mockito mockito-all 1.9.0 test + + org.igniterealtime.smack + smack + 3.2.1 + compile + junit junit-dep diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java index dfe537ba1c..6dd3395bfc 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java @@ -16,21 +16,20 @@ package org.springframework.integration.xmpp.config; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertNull; -import static junit.framework.Assert.assertTrue; - import java.util.List; -import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.junit.Test; + import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.test.util.TestUtils; +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertFalse; +import static junit.framework.Assert.assertTrue; + /** * @author Oleg Zhurakousky */ @@ -52,16 +51,15 @@ public class XmppConnectionParserTests { public void testSimpleConfiguration() { ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionParserTests-simple.xml", this.getClass()); XMPPConnection connection = ac.getBean("connection", XMPPConnection.class); - assertNull(connection.getServiceName()); + assertEquals("localhost", connection.getServiceName()); + assertEquals("localhost", connection.getHost()); + assertEquals(5222, connection.getPort()); assertFalse(connection.isConnected()); XmppConnectionFactoryBean xmppFb = ac.getBean("&connection", XmppConnectionFactoryBean.class); assertEquals("happy.user", TestUtils.getPropertyValue(xmppFb, "user")); assertEquals("blah", TestUtils.getPropertyValue(xmppFb, "password")); assertEquals("Smack", TestUtils.getPropertyValue(xmppFb, "resource")); assertEquals("accept_all", TestUtils.getPropertyValue(xmppFb, "subscriptionMode")); - ConnectionConfiguration configuration = (ConnectionConfiguration) TestUtils.getPropertyValue(connection, "configuration"); - assertEquals("localhost", configuration.getHost()); - assertEquals(5222, configuration.getPort()); } @Test @@ -74,17 +72,15 @@ public class XmppConnectionParserTests { public void testCompleteConfiguration() { ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionParserTests-complete.xml", this.getClass()); XMPPConnection connection = ac.getBean("connection", XMPPConnection.class); - assertNull(connection.getServiceName()); + assertEquals("foogle.com", connection.getServiceName()); + assertEquals("localhost", connection.getHost()); + assertEquals(6222, connection.getPort()); assertFalse(connection.isConnected()); XmppConnectionFactoryBean xmppFb = ac.getBean("&connection", XmppConnectionFactoryBean.class); assertEquals("happy.user", TestUtils.getPropertyValue(xmppFb, "user")); assertEquals("blah", TestUtils.getPropertyValue(xmppFb, "password")); assertEquals("SpringSource", TestUtils.getPropertyValue(xmppFb, "resource")); assertEquals("reject_all", TestUtils.getPropertyValue(xmppFb, "subscriptionMode")); - ConnectionConfiguration configuration = (ConnectionConfiguration) TestUtils.getPropertyValue(connection, "configuration"); - assertEquals("localhost", configuration.getHost()); - assertEquals(6222, configuration.getPort()); - assertEquals("foogle.com", configuration.getServiceName()); } }