# Strange problem when specifying sourceSets

**URL:** <https://discuss.gradle.org/t/strange-problem-when-specifying-sourcesets/3557>\
**Category:** Old Forum Archive\
**Created:** [May 20, 2013, 8:51am UTC](https://discuss.gradle.org/t/strange-problem-when-specifying-sourcesets/3557 "2013-05-20T08:51:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j\_serup](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@j\_serup](https://discuss.gradle.org/u/j_serup)\
**Post date:** [May 20, 2013, 8:51am UTC](https://discuss.gradle.org/t/strange-problem-when-specifying-sourcesets/3557/1 "2013-05-20T08:51:00Z")

</div>

In a multi project I specify the following sourceSets for one of my subprojects:

```gradle
sourceSets {
 main {
  java {
   srcDir 'src'
   srcDir 'scr_ws_gen'
  }
  resources {
   srcDir 'resources'
  }
 }
}

```

When I build the project the compilation fails. The reason is that classes located in ‘src\_ws\_gen’ cannot be seen (… cannot find symbol …). I also noticed that the folder build\classes\main is empty.

If I simply rename the ‘src\_ws\_gen’ folder to ‘src\_other\_gen’ and update the sourceSet:

```gradle
sourceSets {
 main {
  java {
   srcDir 'src'
   srcDir 'src_other_gen'
  }
  resources {
   srcDir 'resources'
  }
 }
}

```

it works fine. Are there restrictions on valid sourceSet names?

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [May 20, 2013, 10:30pm UTC](https://discuss.gradle.org/t/strange-problem-when-specifying-sourcesets/3557/2 "2013-05-20T22:30:00Z")

</div>

There are no restrictions. Looks like you misspelled ‘src’ as ‘scr’.
