SLING-9506 update to bundle parent 39
clean up dependencies
set package version
diff --git a/pom.xml b/pom.xml
index 2f494a0..67a3de8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,13 +24,12 @@
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>33</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>39</version>
<relativePath/>
</parent>
<artifactId>org.apache.sling.models.validation-impl</artifactId>
- <packaging>bundle</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>Apache Sling Models Validation Implementation</name>
@@ -41,6 +40,7 @@
<http.host>localhost</http.host>
<!-- start with -DkeepITServerRunning=true to allow to rerun ITs or inspect the server after the ITs have been executed there -->
<keepITServerRunning>false</keepITServerRunning>
+ <project.build.outputTimestamp>2020-01-22T15:10:15Z</project.build.outputTimestamp>
</properties>
<scm>
@@ -51,11 +51,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- </plugin>
- <plugin>
<!-- Find free ports to run our server -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@@ -154,6 +149,10 @@
</build>
<dependencies>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.models.api</artifactId>
<version>1.2.0</version>
@@ -164,9 +163,17 @@
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- OSGi annotations -->
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
+ <artifactId>org.osgi.service.component.annotations</artifactId>
+ <version>1.3.0</version> <!-- downgrade to DS 1.3 (OSGi R6), as this leads to a run time dependency -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype.annotations</artifactId>
+ <version>1.3.0</version> <!-- downgrade to metatype 1.3 (OSGi R6) -->
<scope>provided</scope>
</dependency>
<dependency>
@@ -189,7 +196,6 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
- <version>16.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/models/validation/InvalidResourceException.java b/src/main/java/org/apache/sling/models/validation/InvalidResourceException.java
index 796bad8..7677e7e 100644
--- a/src/main/java/org/apache/sling/models/validation/InvalidResourceException.java
+++ b/src/main/java/org/apache/sling/models/validation/InvalidResourceException.java
@@ -19,12 +19,14 @@
import org.apache.sling.models.factory.InvalidModelException;
import org.apache.sling.validation.ValidationFailure;
import org.apache.sling.validation.ValidationResult;
+import org.osgi.annotation.versioning.ProviderType;
/**
* Exception embedding a {@link ValidationResult} from Sling Validation.
*
*/
-public class InvalidResourceException extends InvalidModelException {
+@ProviderType
+public final class InvalidResourceException extends InvalidModelException {
/**
*
diff --git a/src/main/java/org/apache/sling/models/validation/package-info.java b/src/main/java/org/apache/sling/models/validation/package-info.java
new file mode 100644
index 0000000..655d59f
--- /dev/null
+++ b/src/main/java/org/apache/sling/models/validation/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+@Version("1.0.0")
+package org.apache.sling.models.validation;
+
+import org.osgi.annotation.versioning.Version;