# Multiple resources/srcDirs with different includes

**URL:** <https://discuss.gradle.org/t/multiple-resources-srcdirs-with-different-includes/23720>\
**Category:** Help/Discuss\
**Tags:** eclipse\
**Created:** [August 14, 2017, 8:25am UTC](https://discuss.gradle.org/t/multiple-resources-srcdirs-with-different-includes/23720 "2017-08-14T08:25:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Finomosec](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Finomosec](https://discuss.gradle.org/u/Finomosec)\
**Post date:** [August 14, 2017, 8:25am UTC](https://discuss.gradle.org/t/multiple-resources-srcdirs-with-different-includes/23720/1 "2017-08-14T08:25:30Z")

</div>

I have the same problem as @knut-forkalsrud here:

> [@Multiple fileTree in resources section](https://discuss.gradle.org/t/multiple-filetree-in-resources-section/4047):
>
> I’m trying to migrate a Maven1 build to Gradle. This is my first real Gradle build, so I’m probably doing something wrong. The issue I face is that there are several directories with their related Ant style matching patterns. Inspired by the users manual (Chapeter 16.3 File Trees: [http://www.gradle.org/docs/current/userguide/working\_with\_files.html#sec:file\_trees](http://www.gradle.org/docs/current/userguide/working_with_files.html#sec:file_trees)) the best I can come up with is the build file below. Unfortunately this causes Gradle to fail with the message Could not find method…

But with the addition that i need different includes per folder.

Something like this:

```
sourceSets {
	main {
		resources {
			srcDirs [
				fileTree(dir: 'resources'),
				fileTree(dir: 'otherResource', includes: [' **/*.xml', '** /*.dtd', '**/*.version'])
			]
		}
	}
}

```

How can i do this?

Greetings Fred;

---

<div class="post-metadata">

**Author:** ![Finomosec](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Finomosec](https://discuss.gradle.org/u/Finomosec)\
**Post date:** [August 14, 2017, 8:31am UTC](https://discuss.gradle.org/t/multiple-resources-srcdirs-with-different-includes/23720/2 "2017-08-14T08:31:04Z")

</div>

I solved it now by moving the other resources to the default resources folder.

But I am still wondering if the original question can be answered.
