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

JSPC plugin missing critical dependencies by default

    XMLWordPrintableJSON

Details

    Description

      The JSPC Maven Plugin, version 2.3.2, fails to work when used as an ordinary Maven plugin. The first two lines of relevance (there's a lot more stack trace, but it is really not very informative) from the build logs are:

      {{{}[WARNING] Error injecting: org.apache.sling.maven.jspc.JspcMojo
      {}}}java.lang.NoClassDefFoundError: org/apache/sling/feature/ArtifactId

      The problem appears to be that the org.apache.sling.feature dependency (and, by transitive closure, the org.osgi.framework dependency as well) is marked as provided. Adding the following two as explicit plugin dependencies is a workaround (and allows at least my builds to work). However, I do not believe that ordinary Maven users should have to do such a workaround.

        <dependency>
            <groupId>org.apache.sling</groupId>
            <artifactId>org.apache.sling.feature</artifactId>
            <version>1.2.30</version>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.framework</artifactId>
            <version>1.10.0</version>
        </dependency>

      Note that 2.3.0 worked correctly.

      Attachments

        Issue Links

          Activity

            People

              karlpauls Karl Pauls
              dkf Donal Fellows
              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 - 50m
                  50m