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

JSPC plugin should support additional resource roots

    XMLWordPrintableJSON

Details

    Description

      When trying to compile JSPs that have includes to dependent resources, it is not possible to compile them. you can't put the includes into the same sources, otherwise they will also be compiled.

      suggestion:

      • create new property: resourceDirectories that is used during resource lookup.

      example:

                  <plugin>
                      <artifactId>maven-dependency-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>extract-deps</id>
                              <phase>generate-sources</phase>
                              <goals>
                                  <goal>unpack-dependencies</goal>
                              </goals>
                              <configuration>
                                  <includeArtifactIds>cq-foundation-content</includeArtifactIds>
                                  <includeTypes>zip</includeTypes>
                                  <excludeTransitive>true</excludeTransitive>
                                  <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
                  <plugin>
                      <!-- use JSPC plugin to validate the JSPs -->
                      <groupId>org.apache.sling</groupId>
                      <artifactId>jspc-maven-plugin</artifactId>
                      <version>2.1.1-SNAPSHOT</version>
                      <configuration>
                          <sourceDirectory>${project.basedir}/jcr_root</sourceDirectory>
                          <resourceDirectories>
                              <resourceDirectory>${project.build.directory}/dependencies/jcr_root</resourceDirectory>
                          </resourceDirectories>
                          <jasperMappedFile>false</jasperMappedFile>
                          <jasperKeepGenerated>false</jasperKeepGenerated>
                          <compilerSourceVM>1.8</compilerSourceVM>
                          <compilerTargetVM>1.8</compilerTargetVM>
                      </configuration>
      

      Attachments

        Issue Links

          Activity

            People

              karlpauls Karl Pauls
              tripod Tobias Bocanegra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: