I want to compile the server directories while excluding the client sub-directories except for the "shared" directories. Is there a way to do this? My source directories looks something like:

/src/domain/client
/src/domain/client/module1
/src/domain/client/module1/shared
/src/domain/client/module1/notshared
/src/domain/client/module1/submoduleA
/src/domain/client/module1/submoduleA/shared
/src/domain/client/module1/submoduleA/notshared
/src/domain/client/module2
/src/domain/client/module2/shared
/src/domain/client/module2/notshared

/src/domain/server/module1
/src/domain/server/module2


It used to work under .7 (which is what I am upgrading from) with the following:

srcRootName = '.'
srcDirNames = ['src']
compile {
    exclude('domain/client/**/*.java')
}

The compiler would only compile the "client" classes if referenced from the server code. Worked great.


Now I'm trying to figure out something similar under .9-rc3 but am stumped. The last thing I tried was:

sourceSets{
  main{
    java{
      srcDir 'src'
    }
  }
}

compileJava {
    exclude('domain/client/**/*.java')
    include('domain/client/**/shared/*.java')
    include('domain/server/**/*.java')
}

The include for the 'shared' directory is not working. The exclude is always taking precedence.

Any pointers would be appreciated.

Thanks,
Chris....

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

   http://xircles.codehaus.org/manage_email


Reply via email to