You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/12/02 09:16:31 UTC
[sling-org-apache-sling-validation-core] branch master updated: SLING-10958 Upgrade to parent 46 (#3)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-validation-core.git
The following commit(s) were added to refs/heads/master by this push:
new 6eedeae SLING-10958 Upgrade to parent 46 (#3)
6eedeae is described below
commit 6eedeaed58ff556344dae2f82074e4d412ca316f
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Dec 2 10:16:27 2021 +0100
SLING-10958 Upgrade to parent 46 (#3)
Use IT based on Sling Starter 11 to run with Java 11
Improve waiting in the IT client until all relevant services are up
---
bnd.bnd | 1 +
pom.xml | 66 ++++++++++++----------
.../impl/it/tests/ValidationServiceIT.java | 6 +-
src/test/provisioning/model.txt | 4 +-
4 files changed, 41 insertions(+), 36 deletions(-)
diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..c0bd0f7
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1 @@
+Sling-Initial-Content:SLING-INF/libs/sling/validation/i18n;overwrite:=true;path:=/libs/sling/validation/i18n
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a0f2308..65f745c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,17 +21,17 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>33</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>46</version>
<relativePath />
</parent>
<artifactId>org.apache.sling.validation.core</artifactId>
- <packaging>bundle</packaging>
<version>1.0.5-SNAPSHOT</version>
<properties>
<sling.java.version>8</sling.java.version>
+ <project.build.outputTimestamp>2020-01-22T15:10:38Z</project.build.outputTimestamp>
<!-- start with -DkeepITServerRunning=true to allow to rerun ITs or inspect the server after the ITs have been executed there -->
<keepITServerRunning>false</keepITServerRunning>
</properties>
@@ -49,19 +49,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <!-- embed the commons.osgi bundle as described in http://njbartlett.name/2014/05/26/static-linking.html,
- to make this bundle compatible with older versions of Sling -->
- <Conditional-Package>org.apache.sling.commons.osgi</Conditional-Package>
- <Sling-Initial-Content>SLING-INF/libs/sling/validation/i18n;overwrite:=true;path:=/libs/sling/validation/i18n</Sling-Initial-Content>
- </instructions>
- </configuration>
- </plugin>
- <plugin>
<!-- Find free ports to run our server -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
@@ -158,6 +145,36 @@
</build>
<dependencies>
<dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component.annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.metatype.annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.framework</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.event</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.component</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
<!-- for now we should rely on 2.9.0 only (not newer) to stay compatible with older Sling distributions -->
@@ -179,7 +196,6 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
- <version>16.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -188,16 +204,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>2.14.0</version>
@@ -218,8 +224,8 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- <!-- need at least 3.1 for OSGi due to https://issues.apache.org/jira/browse/LANG-749 -->
- <version>3.1</version>
+ <!-- need at least 3.8 for building with Java 11: https://issues.apache.org/jira/browse/LANG-1384 -->
+ <version>3.8</version>
<scope>provided</scope>
</dependency>
<!-- for the SlingPostProcessor (https://issues.apache.org/jira/browse/SLING-594)-->
@@ -257,7 +263,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.clients</artifactId>
- <version>1.1.12</version>
+ <version>2.0.12</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceIT.java b/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceIT.java
index 632e888..88c60f4 100644
--- a/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceIT.java
+++ b/src/test/java/org/apache/sling/validation/impl/it/tests/ValidationServiceIT.java
@@ -61,11 +61,9 @@ public class ValidationServiceIT {
slingClient = new OsgiConsoleClient(uri, "admin", "admin");
// wait until the model from the validation.test-services bundle has been deployed
- slingClient.waitExists("/apps/sling/validation/models/model1", 20000, 200);
-
+ slingClient.waitExists("/apps/sling/validation/models/model1", 60000, 200);
// also wait for the contained OSGi services to be registered, (see https://issues.apache.org/jira/browse/SLING-7297)
- // since this is not yet supported in a release version just wait wait until all services came up as well by adding a little sleep time on top
- Thread.sleep(2000);
+ slingClient.waitComponentRegistered(ValidationPostOperation.class.getName(), 20000, 200);
}
@Test
diff --git a/src/test/provisioning/model.txt b/src/test/provisioning/model.txt
index 6ae8524..0d925bc 100644
--- a/src/test/provisioning/model.txt
+++ b/src/test/provisioning/model.txt
@@ -17,11 +17,11 @@
# under the License.
#
-# must be the same feature name as the feature defined in slingstart to allow merging
+# must be the same feature name as the feature defined in starter to allow merging
[feature name=sling-validation]
# Dependencies
[artifacts]
- org.apache.sling/org.apache.sling.launchpad/9/slingstart
+ org.apache.sling/org.apache.sling.starter/11/slingstart
# the following additional bundles have their versions specified in the pom.xml
# this assures that the IT always runs against the right version
org.apache.sling/org.apache.sling.validation.core