Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-163

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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 2.5
    • None
    • None
    • None
    • 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>
      

      Attachments

        1. maven-filtering-ext-1.0.pom
          5 kB
          Benjamin Walther Büel
        2. MavenExtension-checkForPlaceholders.zip
          67 kB
          Benjamin Walther Büel

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              ben4java Benjamin Walther Büel
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: