This is an automated email from the ASF dual-hosted git repository.
cschneider pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-distribution-api.git
The following commit(s) were added to refs/heads/master by this push:
new 4c4bf62 SLING-9448 - Update to sling bundle parent (#6)
4c4bf62 is described below
commit 4c4bf621224cfdd008b715fb83c9ba418e99f19e
Author: Christian Schneider <[email protected]>
AuthorDate: Wed May 13 16:29:22 2020 +0200
SLING-9448 - Update to sling bundle parent (#6)
---
pom.xml | 42 +++++++++-------------
.../sling/distribution/DistributionRequest.java | 12 +++----
.../distribution/DistributionRequestState.java | 2 +-
.../distribution/DistributionRequestType.java | 6 ++--
.../sling/distribution/DistributionResponse.java | 8 ++---
.../org/apache/sling/distribution/Distributor.java | 11 +++---
.../distribution/SimpleDistributionRequest.java | 21 +++++------
.../event/DistributionEventProperties.java | 3 +-
.../event/DistributionEventTopics.java | 2 +-
.../sling/distribution/event/package-info.java | 4 +--
.../apache/sling/distribution/package-info.java | 6 ++--
.../transport/DistributionTransportSecret.java | 5 +--
.../DistributionTransportSecretProvider.java | 6 ++--
.../sling/distribution/transport/package-info.java | 4 +--
14 files changed, 60 insertions(+), 72 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8736f98..ed6997b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,8 +24,8 @@
<!--
======================================================================= -->
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>26</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>38</version>
<relativePath />
</parent>
@@ -34,7 +34,6 @@
<!--
======================================================================= -->
<artifactId>org.apache.sling.distribution.api</artifactId>
<version>0.4.1-SNAPSHOT</version>
- <packaging>bundle</packaging>
<name>Apache Sling Distribution API</name>
<description>
@@ -54,22 +53,8 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-scr-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.sling</groupId>
- <artifactId>maven-sling-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
-
<Bundle-SymbolicName>org.apache.sling.distribution.api</Bundle-SymbolicName>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -93,27 +78,32 @@
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
- <version>2.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
+ <artifactId>osgi.core</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
+ <artifactId>osgi.cmpn</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jetbrains</groupId>
- <artifactId>annotations</artifactId>
- <version>16.0.2</version>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
-
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>2.0.0</version>
+ </dependency>
</dependencies>
</project>
diff --git
a/src/main/java/org/apache/sling/distribution/DistributionRequest.java
b/src/main/java/org/apache/sling/distribution/DistributionRequest.java
index 6545130..5421080 100644
--- a/src/main/java/org/apache/sling/distribution/DistributionRequest.java
+++ b/src/main/java/org/apache/sling/distribution/DistributionRequest.java
@@ -18,9 +18,9 @@
*/
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
+import javax.annotation.Nonnull;
-import org.jetbrains.annotations.NotNull;
+import org.osgi.annotation.versioning.ProviderType;
/**
* A {@link org.apache.sling.distribution.DistributionRequest} represents the
need from the caller to have
@@ -35,7 +35,7 @@ public interface DistributionRequest {
*
* @return the type of the request as a {@link DistributionRequestType}
*/
- @NotNull
+ @Nonnull
DistributionRequestType getRequestType();
/**
@@ -43,7 +43,7 @@ public interface DistributionRequest {
*
* @return an array of paths
*/
- @NotNull
+ @Nonnull
public String[] getPaths();
/**
@@ -52,7 +52,7 @@ public interface DistributionRequest {
* @param path the path to be checked
* @return <code>true</code> if the paths are deep
*/
- public boolean isDeep(@NotNull String path);
+ public boolean isDeep(String path);
@@ -65,6 +65,6 @@ public interface DistributionRequest {
* @param path the path to get applicable filters for
* @return an array of filters
*/
- @NotNull
+ @Nonnull
public String[] getFilters(String path);
}
diff --git
a/src/main/java/org/apache/sling/distribution/DistributionRequestState.java
b/src/main/java/org/apache/sling/distribution/DistributionRequestState.java
index 4dcf6d6..2e3045e 100644
--- a/src/main/java/org/apache/sling/distribution/DistributionRequestState.java
+++ b/src/main/java/org/apache/sling/distribution/DistributionRequestState.java
@@ -18,7 +18,7 @@
*/
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
+import org.osgi.annotation.versioning.ProviderType;
/**
* <p>
diff --git
a/src/main/java/org/apache/sling/distribution/DistributionRequestType.java
b/src/main/java/org/apache/sling/distribution/DistributionRequestType.java
index c534983..d183a57 100644
--- a/src/main/java/org/apache/sling/distribution/DistributionRequestType.java
+++ b/src/main/java/org/apache/sling/distribution/DistributionRequestType.java
@@ -18,9 +18,9 @@
*/
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
+import javax.annotation.Nullable;
-import org.jetbrains.annotations.Nullable;
+import org.osgi.annotation.versioning.ProviderType;
/**
* <p>
@@ -66,7 +66,7 @@ public enum DistributionRequestType {
* @return the type or {@code null}
*/
@Nullable
- public static DistributionRequestType fromName(String n) {
+ public static DistributionRequestType fromName(@Nullable String n) {
if (n == null) {
return null;
}
diff --git
a/src/main/java/org/apache/sling/distribution/DistributionResponse.java
b/src/main/java/org/apache/sling/distribution/DistributionResponse.java
index 12f778c..55c936f 100644
--- a/src/main/java/org/apache/sling/distribution/DistributionResponse.java
+++ b/src/main/java/org/apache/sling/distribution/DistributionResponse.java
@@ -18,10 +18,10 @@
*/
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.osgi.annotation.versioning.ProviderType;
/**
* A {@link org.apache.sling.distribution.DistributionResponse} represents the
outcome of a
@@ -47,7 +47,7 @@ public interface DistributionResponse {
*
* @return the state of the associated request
*/
- @NotNull
+ @Nonnull
DistributionRequestState getState();
/**
diff --git a/src/main/java/org/apache/sling/distribution/Distributor.java
b/src/main/java/org/apache/sling/distribution/Distributor.java
index 8895401..cdaab0e 100644
--- a/src/main/java/org/apache/sling/distribution/Distributor.java
+++ b/src/main/java/org/apache/sling/distribution/Distributor.java
@@ -19,9 +19,10 @@
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
+import javax.annotation.Nonnull;
+
import org.apache.sling.api.resource.ResourceResolver;
-import org.jetbrains.annotations.NotNull;
+import org.osgi.annotation.versioning.ProviderType;
/**
* <p>
@@ -49,9 +50,9 @@ public interface Distributor {
* @param resourceResolver the resource resolver used for authorizing
the request,
* @return a {@link org.apache.sling.distribution.DistributionResponse}
*/
- @NotNull
- DistributionResponse distribute(@NotNull String agentName, @NotNull
ResourceResolver resourceResolver,
- @NotNull DistributionRequest
distributionRequest);
+ @Nonnull
+ DistributionResponse distribute(String agentName, ResourceResolver
resourceResolver,
+ DistributionRequest distributionRequest);
}
diff --git
a/src/main/java/org/apache/sling/distribution/SimpleDistributionRequest.java
b/src/main/java/org/apache/sling/distribution/SimpleDistributionRequest.java
index a1645fe..123d27a 100644
--- a/src/main/java/org/apache/sling/distribution/SimpleDistributionRequest.java
+++ b/src/main/java/org/apache/sling/distribution/SimpleDistributionRequest.java
@@ -18,14 +18,15 @@
*/
package org.apache.sling.distribution;
-import aQute.bnd.annotation.ProviderType;
-
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.jetbrains.annotations.NotNull;
+
+import javax.annotation.Nonnull;
+
+import org.osgi.annotation.versioning.ProviderType;
/**
* A {@link SimpleDistributionRequest} is a {@link DistributionRequest} where
all paths are either "deep" or "shallow".
@@ -45,7 +46,7 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
* @param isDeep is <code>true</code> if all paths are "deep" and is
<code>false</code> if all paths are "shallow"
* @param paths the array of paths to be distributed
*/
- public SimpleDistributionRequest(@NotNull DistributionRequestType
requestType, boolean isDeep, @NotNull String... paths) {
+ public SimpleDistributionRequest(DistributionRequestType requestType,
boolean isDeep, String... paths) {
this(requestType, paths, isDeep? new
HashSet<String>(Arrays.asList(paths)) : new HashSet<String>());
}
@@ -54,7 +55,7 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
* @param requestType the request type
* @param paths the array of paths to be distributed
*/
- public SimpleDistributionRequest(@NotNull DistributionRequestType
requestType, @NotNull String... paths) {
+ public SimpleDistributionRequest(DistributionRequestType requestType,
String... paths) {
this(requestType, false, paths);
}
@@ -65,7 +66,7 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
* @param paths the array of paths to be distributed
* @param deepPaths the set of paths that are to be distributed in depth
(with all their children)
*/
- public SimpleDistributionRequest(@NotNull DistributionRequestType
requestType, @NotNull String[] paths, @NotNull Set<String> deepPaths) {
+ public SimpleDistributionRequest(DistributionRequestType requestType,
String[] paths, Set<String> deepPaths) {
this(requestType, paths, deepPaths, new HashMap<String, String[]>());
}
@@ -77,7 +78,7 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
* @param deepPaths the set of paths that are to be distributed in depth
(with all their children)
* @param pathFilters the filters applicable for each path
*/
- public SimpleDistributionRequest(@NotNull DistributionRequestType
requestType, @NotNull String[] paths, @NotNull Set<String> deepPaths, @NotNull
Map<String, String[]> pathFilters) {
+ public SimpleDistributionRequest(DistributionRequestType requestType,
String[] paths, Set<String> deepPaths, Map<String, String[]> pathFilters) {
this.requestType = requestType;
this.paths = paths;
this.deepPaths = deepPaths;
@@ -89,7 +90,7 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
*
* @return the type of the request as a {@link DistributionRequestType}
*/
- @NotNull
+ @Nonnull
public DistributionRequestType getRequestType() {
return requestType;
}
@@ -108,11 +109,11 @@ public final class SimpleDistributionRequest implements
DistributionRequest {
* Returns whether the a path is covering the entire subtree (deep) or
just the specified nodes (shallow)
* @return <code>true</code> if the path is deep
*/
- public boolean isDeep(@NotNull String path) {
+ public boolean isDeep(String path) {
return deepPaths.contains(path);
}
- @NotNull
+ @Nonnull
public String[] getFilters(String path) {
String[] filters = pathFilters.get(path);
return filters != null ? filters : new String[0];
diff --git
a/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java
b/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java
index 45b0553..dd5da1e 100644
---
a/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java
+++
b/src/main/java/org/apache/sling/distribution/event/DistributionEventProperties.java
@@ -18,8 +18,7 @@
*/
package org.apache.sling.distribution.event;
-
-import aQute.bnd.annotation.ProviderType;
+import org.osgi.annotation.versioning.ProviderType;
/**
* an interface containing of the possible properties of events related to
distribution
diff --git
a/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java
b/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java
index 4d1a1f3..7323cf8 100644
---
a/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java
+++
b/src/main/java/org/apache/sling/distribution/event/DistributionEventTopics.java
@@ -18,7 +18,7 @@
*/
package org.apache.sling.distribution.event;
-import aQute.bnd.annotation.ProviderType;
+import org.osgi.annotation.versioning.ProviderType;
/**
* an interface containing of the possible topics of events related to
distribution
diff --git
a/src/main/java/org/apache/sling/distribution/event/package-info.java
b/src/main/java/org/apache/sling/distribution/event/package-info.java
index 39da672..fd0e012 100644
--- a/src/main/java/org/apache/sling/distribution/event/package-info.java
+++ b/src/main/java/org/apache/sling/distribution/event/package-info.java
@@ -17,8 +17,6 @@
* under the License.
*/
-@Version("0.3.0")
[email protected]("0.3.0")
package org.apache.sling.distribution.event;
-import aQute.bnd.annotation.Version;
-
diff --git a/src/main/java/org/apache/sling/distribution/package-info.java
b/src/main/java/org/apache/sling/distribution/package-info.java
index 5c2c564..ab781c9 100644
--- a/src/main/java/org/apache/sling/distribution/package-info.java
+++ b/src/main/java/org/apache/sling/distribution/package-info.java
@@ -17,8 +17,6 @@
* under the License.
*/
-@Version("0.3.1")
[email protected]
[email protected]("0.3.1")
package org.apache.sling.distribution;
-
-import aQute.bnd.annotation.Version;
-
diff --git
a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java
b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java
index 815142a..55004e9 100644
---
a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java
+++
b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecret.java
@@ -19,9 +19,10 @@
package org.apache.sling.distribution.transport;
import java.util.Map;
-import aQute.bnd.annotation.ConsumerType;
-import org.jetbrains.annotations.Nullable;
+import javax.annotation.Nullable;
+
+import org.osgi.annotation.versioning.ConsumerType;
/**
* <p>
diff --git
a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java
b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java
index eaac9c9..3a0c933 100644
---
a/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java
+++
b/src/main/java/org/apache/sling/distribution/transport/DistributionTransportSecretProvider.java
@@ -18,11 +18,11 @@
*/
package org.apache.sling.distribution.transport;
-import aQute.bnd.annotation.ConsumerType;
-
import java.net.URI;
-import org.jetbrains.annotations.Nullable;
+import javax.annotation.Nullable;
+
+import org.osgi.annotation.versioning.ConsumerType;
/**
* <p>
diff --git
a/src/main/java/org/apache/sling/distribution/transport/package-info.java
b/src/main/java/org/apache/sling/distribution/transport/package-info.java
index 822acfc..32a676f 100644
--- a/src/main/java/org/apache/sling/distribution/transport/package-info.java
+++ b/src/main/java/org/apache/sling/distribution/transport/package-info.java
@@ -17,8 +17,8 @@
* under the License.
*/
-@Version("0.1.1")
[email protected]
[email protected]("0.1.1")
package org.apache.sling.distribution.transport;
-import aQute.bnd.annotation.Version;