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: Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      any

      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>
      
      1. MavenExtension-checkForPlaceholders.zip
        67 kB
        Benjamin Walther Büel
      2. maven-filtering-ext-1.0.pom
        5 kB
        Benjamin Walther Büel

        Issue Links

          Activity

          Benjamin Walther Büel created issue -
          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 ]
          Affects Version/s 3.0.2 [ 16952 ]
          Affects Version/s 3.0.3 [ 17061 ]
          Affects Version/s 3.0.4 [ 17215 ]
          Affects Version/s 3.0 [ 13142 ]
          Component/s General [ 12033 ]
          Complexity Intermediate [ 10011 ]
          Affects Version/s 2.5 [ 16232 ]
          Key MNG-5274 MRESOURCES-163
          Affects Version/s 3.0.1 [ 16331 ]
          Rowan Seymour made changes -
          Link This issue duplicates MRESOURCES-162 [ MRESOURCES-162 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:20:57 UTC 2015 [ 1428236457206 ]
          Mark Thomas made changes -
          Workflow jira [ 12724983 ] Default workflow, editable Closed status [ 12756619 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 01:00:00 UTC 2015 [ 1428282000487 ]
          Mark Thomas made changes -
          Workflow jira [ 12962653 ] Default workflow, editable Closed status [ 12998970 ]
          Hide
          Karl Heinz Marbaise added a comment -

          Will never accept jar files instead of source code patches. If you like you can add the appropriate source code patch based on the current state of svn trunk and reopen the issue.

          Show
          Karl Heinz Marbaise added a comment - Will never accept jar files instead of source code patches. If you like you can add the appropriate source code patch based on the current state of svn trunk and reopen the issue.
          Karl Heinz Marbaise made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Karl Heinz Marbaise [ khmarbaise ]
          Resolution Incomplete [ 4 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          1332d 5h 52m 1 Karl Heinz Marbaise 05/Dec/15 15:14

            People

            • Assignee:
              Karl Heinz Marbaise
              Reporter:
              Benjamin Walther Büel
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development