From 9db5e28fe5a0dc6ee6f32321140c1dffcfdb816c Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 20 Jul 2014 11:08:11 +0200 Subject: [PATCH 1/5] Fix ExperimentalInitializer --- .../smack/initializer/experimental/ExperimentalInitializer.java | 2 +- .../{extensions.xml => experimental.xml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename smack-experimental/src/main/resources/org.jivesoftware.smackx/{extensions.xml => experimental.xml} (100%) diff --git a/smack-experimental/src/main/java/org/jivesoftware/smack/initializer/experimental/ExperimentalInitializer.java b/smack-experimental/src/main/java/org/jivesoftware/smack/initializer/experimental/ExperimentalInitializer.java index 9c66e0506..c73b1a862 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smack/initializer/experimental/ExperimentalInitializer.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smack/initializer/experimental/ExperimentalInitializer.java @@ -32,6 +32,6 @@ public class ExperimentalInitializer extends UrlInitializer { @Override protected String getConfigUrl() { - return "classpath:org.jivesoftware.smackx/extensions.xml"; + return "classpath:org.jivesoftware.smackx/experimental.xml"; } } diff --git a/smack-experimental/src/main/resources/org.jivesoftware.smackx/extensions.xml b/smack-experimental/src/main/resources/org.jivesoftware.smackx/experimental.xml similarity index 100% rename from smack-experimental/src/main/resources/org.jivesoftware.smackx/extensions.xml rename to smack-experimental/src/main/resources/org.jivesoftware.smackx/experimental.xml From 59527d320d6b2a024e5c0b1cca5d9d25375f6a3c Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 20 Jul 2014 11:19:50 +0200 Subject: [PATCH 2/5] Add SmackAndOsgiInitializer OSGi ServiceComponents need the activate method, make sure it exists for every SmackInitializer by using this class. --- .../initializer/SmackAndOsgiInitializer.java | 28 +++++++++++++++++++ .../smack/initializer/UrlInitializer.java | 10 +------ .../smack/util/dns/javax/JavaxResolver.java | 4 +-- 3 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 smack-core/src/main/java/org/jivesoftware/smack/initializer/SmackAndOsgiInitializer.java diff --git a/smack-core/src/main/java/org/jivesoftware/smack/initializer/SmackAndOsgiInitializer.java b/smack-core/src/main/java/org/jivesoftware/smack/initializer/SmackAndOsgiInitializer.java new file mode 100644 index 000000000..885864b7d --- /dev/null +++ b/smack-core/src/main/java/org/jivesoftware/smack/initializer/SmackAndOsgiInitializer.java @@ -0,0 +1,28 @@ +/** + * + * Copyright 2014 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.initializer; + +public abstract class SmackAndOsgiInitializer implements SmackInitializer { + + /** + * A simple wrapper around {@link #initialize} for OSGi, as the activate method of a component + * must have a void return type. + */ + public final void activate() { + initialize(); + } +} diff --git a/smack-core/src/main/java/org/jivesoftware/smack/initializer/UrlInitializer.java b/smack-core/src/main/java/org/jivesoftware/smack/initializer/UrlInitializer.java index d716a7286..e2f13b474 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/initializer/UrlInitializer.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/initializer/UrlInitializer.java @@ -34,17 +34,9 @@ import org.jivesoftware.smack.util.FileUtils; * * @author Florian Schmaus */ -public abstract class UrlInitializer implements SmackInitializer { +public abstract class UrlInitializer extends SmackAndOsgiInitializer { private static final Logger LOGGER = Logger.getLogger(UrlInitializer.class.getName()); - /** - * A simple wrapper around {@link #initialize} for OSGi, as the activate method of a component - * must have a void return type. - */ - public final void activate() { - initialize(); - } - @Override public List initialize() { return initialize(this.getClass().getClassLoader()); diff --git a/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java b/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java index 78d0d4260..430b496d8 100644 --- a/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java +++ b/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java @@ -28,7 +28,7 @@ import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; -import org.jivesoftware.smack.initializer.SmackInitializer; +import org.jivesoftware.smack.initializer.SmackAndOsgiInitializer; import org.jivesoftware.smack.util.DNSUtil; import org.jivesoftware.smack.util.dns.DNSResolver; import org.jivesoftware.smack.util.dns.SRVRecord; @@ -39,7 +39,7 @@ import org.jivesoftware.smack.util.dns.SRVRecord; * @author Florian Schmaus * */ -public class JavaxResolver implements DNSResolver, SmackInitializer { +public class JavaxResolver extends SmackAndOsgiInitializer implements DNSResolver { private static JavaxResolver instance; private static DirContext dirContext; From 494f7d5b342dbec20edf961850fa949f5cd88612 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 20 Jul 2014 12:58:05 +0200 Subject: [PATCH 3/5] Add getDatestamp() to build.gradle --- build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3365469cd..200309eed 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ allprojects { // For example 4.0.0-rc1 becomes 4.0.0.rc1, but // 4.0.0-SNAPSHOT-2014-05-01 becomes 4.0.0.SNAPSHOT-2014-05-01 'Bundle-Version': version.replaceFirst("-", "."), - 'Built-Date': new Date(), + 'Built-Date': getDatestamp(), 'Built-JDK': System.getProperty('java.version'), 'Built-Gradle': gradle.gradleVersion, 'Built-By': System.getProperty('user.name') @@ -237,3 +237,11 @@ def getGitCommit() { assert !gitCommit.isEmpty() gitCommit } + +// Returns only the date in yyyy-MM-dd format, as otherwise, with +// hh:mm:ss information, the manifest files would change with every +// build, causing unnecessary rebuilds. +def getDatestamp() { + def date = new Date() + return date.format('yyyy-MM-dd') +} From d56252f9fb883a2f7cbfc355e586de6ee286c5b1 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 20 Jul 2014 11:21:25 +0200 Subject: [PATCH 4/5] Smack 4.0.1 --- build.gradle | 2 +- resources/releasedocs/changelog.html | 36 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 200309eed..4f0ffcfd9 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ allprojects { ext { shortVersion = '4.0.1' - isSnapshot = true + isSnapshot = false gitCommit = getGitCommit() javadocAllDir = new File(buildDir, 'javadoc') documentationDir = new File(projectDir, 'documentation') diff --git a/resources/releasedocs/changelog.html b/resources/releasedocs/changelog.html index efe216bce..394774f98 100644 --- a/resources/releasedocs/changelog.html +++ b/resources/releasedocs/changelog.html @@ -141,6 +141,42 @@ hr {
+

4.0.1 -- 2014-07-20

+ +

Sub-task +

+
    +
  • [SMACK-346] - Bug in return code for rejection handling in FileTransferManager +
  • +
+ +

Bug +

+
    +
  • [SMACK-574] - Documentation still refers at some places to Connection +
  • +
  • [SMACK-575] - PingManager schedules pings after pingInterval when it should be use nextPingIn instead +
  • +
  • [SMACK-577] - Bookmarks and FormField toXml() methods do not properly escape XML +
  • +
  • [SMACK-583] - PacketListeners may not be invoked in delivery order +
  • +
+ +

Improvement +

+
    +
  • [SMACK-576] - smack-resolver-javax should become a OSGi ServiceComponent +
  • +
+ +

New Feature +

+
    +
  • [SMACK-580] - Add support for retrieving a PubSub node's affiliations +
  • +
+

4.0.0 -- 2014-06-08

Sub-task From 2ca92ef6012ad49e68f3e4e42b762e6fdd0bd226 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 20 Jul 2014 13:17:14 +0200 Subject: [PATCH 5/5] Smack 4.0.2-SNAPSHOT --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4f0ffcfd9..34bb6defb 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ allprojects { apply plugin: 'eclipse' ext { - shortVersion = '4.0.1' - isSnapshot = false + shortVersion = '4.0.2' + isSnapshot = true gitCommit = getGitCommit() javadocAllDir = new File(buildDir, 'javadoc') documentationDir = new File(projectDir, 'documentation')