Thanks for the link to sample projects. I reviewed some of these but it seems
to be mixed bag whether they build successfully for me with Java 11 or not.
I’m asking because of a PAX exam test bundle added to PR
sling-org-apache-sling-junit-core [0] that works with Java 8 but will not build
successfully with Java 11. I modeled this bundle after
sling-org-apache-sling-servlets-annotations [1] which also seems to build with
Java 8 but not with 11.
Maybe it’s fine that way since the pom.xml states…
<sling.java.version>8</sling.java.version>
Another seemly odd aspect relates to the parent version, 33. Using parent
version 35 or later, the build fails using Java 8 as well. Resulting in the
error
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.sling.junit.annotations.ReferenceIT
[main] INFO org.ops4j.pax.exam.spi.DefaultExamSystem - Pax Exam System
(Version: 4.13.4) created.
[main] INFO org.ops4j.pax.exam.ExamJavaRunner - ExamJavaRunner completed
successfully
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.225 s
<<< FAILURE! - in org.apache.sling.junit.annotations.ReferenceIT
[ERROR] org.apache.sling.junit.annotations.ReferenceIT Time elapsed: 4.218 s
<<< ERROR!
org.ops4j.pax.exam.TestContainerException:
[file:/Users/cmrockwe/Documents/a3workspace/sling-org-apache-sling-junit-core/src/it/annotations-it/target/org.apache.sling.junit.annotations.it-1.0.0.jar]
is not a valid bundle (bundleSymbolicName and bundleName are null)
at
org.ops4j.pax.exam.forked.provision.PlatformImpl.validateBundle(PlatformImpl.java:290)
at
org.ops4j.pax.exam.forked.provision.PlatformImpl.download(PlatformImpl.java:151)
Inspecting the bundle META-INF/MANIFEST.MF illustrates the problem. But not
sure why the bundle is so incomplete...
Manifest-Version: 1.0
Implementation-Title: Apache Sling Junit Server Annotations IT
Implementation-Version: 1.0.0
Specification-Vendor: The Apache Software Foundation
Specification-Title: Apache Sling Junit Server Annotations IT
Build-Jdk-Spec: 1.8
Created-By: Maven Jar Plugin 3.2.0
Specification-Version: 1.0
Implementation-Vendor: The Apache Software Foundation
[0] https://github.com/apache/sling-org-apache-sling-junit-core/pull/5
[1]
https://github.com/apache/sling-org-apache-sling-servlets-annotations/tree/master/src/it/annotations-it
> On Dec 3, 2020, at 5:42 AM, Oliver Lietz <[email protected]> wrote:
>
> On Wednesday, December 2, 2020 11:45:28 PM CET Cris Rockwell wrote:
>> Hi Sling Devs
>
> Hi Cris,
>
>> Can anyone advise whether it is possible to use sling-testing-paxexam [0]
>> for projects based on Sling 12 Starter with Java11? Docs show how to
>> configure a slingQuickstart [1] but I was not and to get it working with
>> Java 11.
>
> Sling Testing PaxExam is not using the Starter but the bundles and
> configurations from Sling's Karaf Features.
>
> See the list of modules which use it, they build with 8, 11 and 14:
>
> https://github.com/apache/sling-org-apache-sling-testing-paxexam/network/
> dependents
>
> HTH,
> O.
>
>
>> Thanks
>> Cris
>>
>> [0] https://github.com/apache/sling-org-apache-sling-testing-paxexam
>> [1]
>> https://sling.apache.org/documentation/development/testing-paxexam.html#3-c
>> reate-a-test-class-and-provide-a-configuration
>
>
>
>