diff --git a/build.gradle b/build.gradle index 99c8f8195..2bd41d3d3 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') @@ -244,3 +244,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') +} 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 +

+ + +

Bug +

+ + +

Improvement +

+ + +

New Feature +

+ +

4.0.0 -- 2014-06-08

Sub-task 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-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 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;