To be fair, you can do the same in Maven as well.

<build>
  <resources>
    <resource>
      <filtering>true</filtering>
      <directory>src/main/resources</directory>
    </resource>
    <resource>
      <filtering>false</filtering>
      <directory>src/test/java</directory>
        <includes>
          <include>**/*.html</include>
        </includes>
    </resource>
  </resources>
</build>

Maven does make you explicitly define the includes/excludes though.


On Mon, 2010-08-23 at 09:22 -0700, Dillon Sellars wrote:
> Yes, that works perfectly. Thank you for freeing me from the dark
> chaotic confines of Maven. 
> 
> 
> sourceSets {
>     main {
>         java {
>             srcDir 'src/main/java'
>         }
>         resources {
>             srcDir 'src/main/resources'
>             srcDir 'src/main/java'
>         }
>     }
> }
> 
> On Thu, Aug 19, 2010 at 3:14 PM, Adam Murdoch <[email protected]> wrote:
>          On 20/08/10 4:32 AM, Dillon Sellars wrote:
>                 I know non-code files should generally go into
>                 src/main/resources, but for Wicket it's nice to have
>                 the html next to the .java files. How can I include
>                  **/*.html resources from src/main/java and have them
>                 go into the classes directory? 
>         
>         
>         You can simply add src/main/java as a resource directory.
>         Everything under there which is not a .java file will be
>         treated as a resource and copied across. (It will
>         ignore .groovy as well if you're using the groovy
>         plugin, .scala if you're using the scala plugin, and so on):
>         
>         sourceSets.main.resources.srcDir 'src/main/java'
>         
>         
>         -- 
>         Adam Murdoch
>         Gradle Developer
>         http://www.gradle.org
>         CTO, Gradle Inc. - Gradle Training, Support, Consulting
>         http://www.gradle.biz
>         
>         
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe from this list, please visit:
>         
>           http://xircles.codehaus.org/manage_email
>         
>         
>         
> 
> 

-- 
Steve Ebersole <[email protected]>
http://hibernate.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to