SLING-11335: Sling update to 47 (#2)
diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..3755a72
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,7 @@
+Bundle-DocURL: https://sling.apache.org/documentation/bundles/log-tracers.html
+
+-includeresource:\
+ @org.apache.felix.utils-*.jar!/org/apache/felix/utils/json/JSONWriter.class
+
+-removeheaders:\
+ Include-Resource
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d7481ad..b2a3efa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,12 +24,11 @@
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>32</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>47</version>
</parent>
<artifactId>org.apache.sling.tracer</artifactId>
- <packaging>bundle</packaging>
<version>1.0.7-SNAPSHOT</version>
<name>Apache Sling Log Tracer</name>
@@ -48,23 +47,15 @@
<tag>HEAD</tag>
</scm>
+ <properties>
+ <project.build.outputTimestamp>1</project.build.outputTimestamp>
+ </properties>
<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-DocURL>
- https://sling.apache.org/documentation/bundles/log-tracers.html
- </Bundle-DocURL>
- <Embed-Dependency>
- org.apache.felix.utils;inline=org/apache/felix/utils/json/JSONWriter.class
- </Embed-Dependency>
- </instructions>
- </configuration>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
@@ -74,7 +65,6 @@
<!-- the used logback version is only compatible with SLF4J 1.6 -->
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.7.5</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -85,8 +75,7 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
+ <artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
@@ -100,10 +89,6 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.annotation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
</dependency>
<dependency>
@@ -136,7 +121,6 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
- <version>16.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -165,13 +149,13 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
+ <version>4.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.johnzon</artifactId>
- <version>1.0.0</version>
+ <version>1.2.14</version>
<scope>test</scope>
</dependency>
diff --git a/src/test/java/org/apache/sling/tracer/internal/TestUtil.java b/src/test/java/org/apache/sling/tracer/internal/TestUtil.java
index 935b931..1db80d2 100644
--- a/src/test/java/org/apache/sling/tracer/internal/TestUtil.java
+++ b/src/test/java/org/apache/sling/tracer/internal/TestUtil.java
@@ -25,7 +25,7 @@
import org.mockito.ArgumentCaptor;
import static java.util.Arrays.asList;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
diff --git a/src/test/java/org/apache/sling/tracer/internal/TracerLogServletTest.java b/src/test/java/org/apache/sling/tracer/internal/TracerLogServletTest.java
index 821f5ae..60983f6 100644
--- a/src/test/java/org/apache/sling/tracer/internal/TracerLogServletTest.java
+++ b/src/test/java/org/apache/sling/tracer/internal/TracerLogServletTest.java
@@ -30,6 +30,7 @@
import javax.json.Json;
import javax.json.JsonObject;
import javax.servlet.ServletOutputStream;
+import javax.servlet.WriteListener;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -50,7 +51,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -177,5 +178,15 @@
public void write(@NotNull byte[] b, int off, int len) throws IOException {
baos.write(b, off, len);
}
+
+ @Override
+ public boolean isReady() {
+ return true;
+ }
+
+ @Override
+ public void setWriteListener(WriteListener writeListener) {
+
+ }
}
}