Maven Resources Plugin
  1. Maven Resources Plugin
  2. MRESOURCES-163

Filtering: check if there are any placeholders that were not substituted

    Details

    • Type: New Feature New Feature
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      any
    • Number of attachments :
      2

      Description

      Functionality that checks if after filtering there are remaining placeholders that were not replaced during filtering.

      Example:
      template.properties:

       
      log.level=@log.level@
      hibernate.show-sql=@hibernate.show-sql@
      

      filter file my.properties:

      log.level=debug
      

      target file:

       
      log.level=debug
      hibernate.show-sql=@hibernate.show-sql@ 
      

      With the attached extended resources&filter plugins will throw:

      Failed to execute goal org.apache.maven.plugins:maven-resources-plugin-ext:2.5:copy-resources (copy-resources) on project foo: File server.properties line:hibernate.show-sql=@hibernate.show-sql@ contains one or more placeholders not replaced by filter(s).
      

      Usage:

      <plugins>
                      <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-resources-plugin-ext</artifactId>
                          <version>2.5</version>
                           <configuration>
                              <delimiters>
                                  <delimiter>@</delimiter>
                              </delimiters>
                              <outputDirectory>target/classes</outputDirectory>
                              <checkFilterPlaceholders>true</checkFilterPlaceholders>
                          </configuration>
                       </plugin>
      </plugins>
      

        Issue Links

          Activity

          Robert Scholte made changes -
          Field Original Value New Value
          Description Functionality that checks if after filtering there are remaining placeholders that were not replaced during filtering.

          Example:
          template.properties:
          log.level=@log.level@
          hibernate.show-sql=@hibernate.show-sql@

          filter file my.properties:
          log.level=debug

          target file:
          log.level=debug
          hibernate.show-sql=@hibernate.show-sql@

          With the attached extended resources&filter plugins will throw:
          Failed to execute goal org.apache.maven.plugins:maven-resources-plugin-ext:2.5:copy-resources (copy-resources) on project foo: File server.properties line:hibernate.show-sql=@hibernate.show-sql@ contains one or more placeholders not replaced by filter(s).

          Usage:

          <plugins>
                          <plugin>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-resources-plugin-ext</artifactId>
                              <version>2.5</version>
                               <configuration>
                                  <delimiters>
                                      <delimiter>@</delimiter>
                                  </delimiters>
                                  <outputDirectory>target/classes</outputDirectory>
                                  <checkFilterPlaceholders>true</checkFilterPlaceholders>
                              </configuration>
                           </plugin>
          </plugins>
          Functionality that checks if after filtering there are remaining placeholders that were not replaced during filtering.

          Example:
          {{template.properties}}:
          {noformat}
          log.level=@log.level@
          hibernate.show-sql=@hibernate.show-sql@
          {noformat}

          filter file {{my.properties}}:
          {noformat}
          log.level=debug
          {noformat}

          target file:
          {noformat}
          log.level=debug
          hibernate.show-sql=@hibernate.show-sql@
          {noformat}

          With the attached extended resources&filter plugins will throw:
          {noformat}
          Failed to execute goal org.apache.maven.plugins:maven-resources-plugin-ext:2.5:copy-resources (copy-resources) on project foo: File server.properties line:hibernate.show-sql=@hibernate.show-sql@ contains one or more placeholders not replaced by filter(s).
          {noformat}

          Usage:
          {code:xml}
          <plugins>
                          <plugin>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-resources-plugin-ext</artifactId>
                              <version>2.5</version>
                               <configuration>
                                  <delimiters>
                                      <delimiter>@</delimiter>
                                  </delimiters>
                                  <outputDirectory>target/classes</outputDirectory>
                                  <checkFilterPlaceholders>true</checkFilterPlaceholders>
                              </configuration>
                           </plugin>
          </plugins>
          {code}
          Robert Scholte made changes -
          Project Maven 2 & 3 [ 10500 ] Maven 2.x Resources Plugin [ 11145 ]
          Key MNG-5274 MRESOURCES-163
          Affects Version/s 2.5 [ 16232 ]
          Affects Version/s 3.0 [ 13142 ]
          Affects Version/s 3.0.1 [ 16331 ]
          Affects Version/s 3.0.2 [ 16952 ]
          Affects Version/s 3.0.3 [ 17061 ]
          Affects Version/s 3.0.4 [ 17215 ]
          Component/s General [ 12033 ]
          Complexity Intermediate [ 10011 ]
          Rowan Seymour made changes -
          Link This issue duplicates MRESOURCES-162 [ MRESOURCES-162 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Benjamin Walther Büel
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: