Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10010

Make testing compliant with Java 9 and higher

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • JCR Resource 3.0.22
    • JCR Resource 3.1.0
    • JCR
    • None

    Description

      Building module org-apache-sling-jcr-resource fails, and during test phase this is the error:
       
      Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException 
       
      java version "11.0.6" 2020-01-14 LTS
      Apache Maven 3.6.3 
       
      I tried to change parent to org.apache.sling:sling-bundle-parent:pom:40 but then building fails because of the errors reported by maven-enforcer-plugin.

      [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (ban-felix-scr-annotations) @ org.apache.sling.jcr.resource ---
      [WARNING] The artifact org.apache.sling:org.apache.sling.testing.sling-mock:jar:2.6.2 has been relocated to org.apache.sling:org.apache.sling.testing.sling-mock.junit4:jar:2.6.2
      [INFO] 
      [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (ban-maven-bundle-plugin) @ org.apache.sling.jcr.resource ---
      [WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedPlugins failed with message:
      The maven-bundle-plugin is no longer supported - please migrate to bnd-maven-plugin or stick
                                              with Sling Parent 34.
      Found Banned Plugin: org.apache.felix:maven-bundle-plugin:maven-plugin:4.2.1
      Use 'mvn dependency:tree' to locate the source of the banned dependencies.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  1.647 s
      [INFO] Finished at: 2020-12-18T13:46:04+01:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (ban-maven-bundle-plugin) on project org.apache.sling.jcr.resource: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
      
      

      Attachments

        Issue Links

          Activity

            People

              joerghoh Joerg Hoh
              miroslav#1 miroslav#1
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m