# Skip files from TemplateEngine in processResources

**URL:** <https://discuss.gradle.org/t/skip-files-from-templateengine-in-processresources/24015>\
**Category:** Help/Discuss\
**Created:** [September 8, 2017, 7:30am UTC](https://discuss.gradle.org/t/skip-files-from-templateengine-in-processresources/24015 "2017-09-08T07:30:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![meip](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@meip](https://discuss.gradle.org/u/meip)\
**Post date:** [September 8, 2017, 7:30am UTC](https://discuss.gradle.org/t/skip-files-from-templateengine-in-processresources/24015/1 "2017-09-08T07:30:05Z")

</div>

The project has resource \*.yml files with multiline strings values which contain SimpleTemplateEngine-like placeholders `${placeholder}`. When the `processResources` task is being executed the `expand` fails because it can not do the template processing.  
Is there a way to just skip this template processing in `FilterChain` or `processResources` for certain files?

---

<div class="post-metadata">

**Author:** ![meip](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@meip](https://discuss.gradle.org/u/meip)\
**Post date:** [September 11, 2017, 10:11am UTC](https://discuss.gradle.org/t/skip-files-from-templateengine-in-processresources/24015/2 "2017-09-11T10:11:55Z")

</div>

I found an answer myself:

```gradle
    processResources {
        filesMatching("**/*.yml") { matchedFile ->
            filter { line ->
                line.replace('${', '\\${')
            }
        }
    }

```

Escape the placeholders in the \*.yml to prevent Gradle’s template expanding to throw `MissingPropertyException` because these placeholders are later used from the application to parametrize dynamically.
