This is an automated email from the ASF dual-hosted git repository.

olli pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-log.git


The following commit(s) were added to refs/heads/master by this push:
     new 454190a  SLING-12234 Commons Log builds fail on Windows
454190a is described below

commit 454190a289a568da93024bff496af773e598c97c
Author: Oliver Lietz <[email protected]>
AuthorDate: Sat Mar 16 15:55:49 2024 +0100

    SLING-12234 Commons Log builds fail on Windows
    
    - update Pax Exam to 4.13.3
    - use Base Store 1.5.1 (to set temp directory)
    - redirect test output to files
    - create Store with temp files in build target directory
    - build with default Jenkins configuration
---
 .sling-module.json                                            |  8 --------
 pom.xml                                                       |  9 ++++++++-
 .../log/logback/integration/PackagingDataTestUtil.java        | 11 +++++++++--
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/.sling-module.json b/.sling-module.json
deleted file mode 100644
index 7175da4..0000000
--- a/.sling-module.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "jenkins": {
-    "operatingSystems": [
-      "linux"
-    ]
-  }
-}
-
diff --git a/pom.xml b/pom.xml
index 922bbb5..de9103a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,7 +48,7 @@
     <slf4j.version>1.7.32</slf4j.version>
     <logback.version>1.2.13</logback.version>
     <!-- Higher versions of pax exam cause class loading errors -->
-    <pax-exam.version>4.13.2</pax-exam.version>
+    <pax-exam.version>4.13.3</pax-exam.version>
     <sling.java.version>11</sling.java.version>
     <project.build.outputTimestamp>1706531563</project.build.outputTimestamp>
     <bundle.build.dir>
@@ -119,6 +119,7 @@
           </execution>
         </executions>
         <configuration>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <systemPropertyVariables>
             <project.bundle.file>${bundle.file.name}</project.bundle.file>
             <project.boot.file>${bundle.file.name}</project.boot.file>
@@ -155,6 +156,12 @@
   </reporting>
 
   <dependencies>
+    <dependency>
+      <groupId>org.ops4j.base</groupId>
+      <artifactId>ops4j-base-store</artifactId>
+      <version>1.5.1</version>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
diff --git 
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
 
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
index d599380..22565ac 100644
--- 
a/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
+++ 
b/src/test/java/org/apache/sling/commons/log/logback/integration/PackagingDataTestUtil.java
@@ -22,10 +22,14 @@ package org.apache.sling.commons.log.logback.integration;
 import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle;
 import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
 
+import java.io.File;
 import java.io.InputStream;
 import java.net.URL;
 
+import org.ops4j.pax.exam.util.PathUtils;
 import org.ops4j.pax.tinybundles.core.TinyBundle;
+import org.ops4j.store.Store;
+import org.ops4j.store.StoreFactory;
 import org.osgi.framework.Constants;
 
 /**
@@ -41,8 +45,11 @@ public class PackagingDataTestUtil {
         //Avoid referring to test bundle classes otherwise they get loaded in 
2 bundles i.e.
         //pax exam probe bundle and our packagedatatest. So we refer only by 
class name strings
         String activatorClassName = 
"org.apache.sling.commons.log.logback.integration.bundle.PackageDataActivator";
-        // not needed and causes problems when running with Java 11 since the 
version of bndlib is too old
-        TinyBundle tb = bundle()
+        final String path = String.format("%s/target/temp", 
PathUtils.getBaseDir());
+        final File temp = new File(path);
+        final Store store = StoreFactory.newStore(temp);
+        // ee is not needed and causes problems when running with Java 11 
since the version of bndlib is too old
+        TinyBundle tb = bundle(store)
                 .set(Constants.BUNDLE_ACTIVATOR, activatorClassName)
                 .set("-noee", Boolean.TRUE.toString())
                 .set(Constants.BUNDLE_SYMBOLICNAME, TEST_BUNDLE_NAME)

Reply via email to