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
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>
@@ -156,6 +157,12 @@
<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>
<version>${slf4j.version}</version>
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 @@
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 @@
//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)