On Jun 17, 2009, at 4:54 PM, Donal Mc Namee wrote:

Hi Hans,
Thanks for that solution. It works fine and publishes both artifacts.

However, it appears that the new Jar task is including all the classes
found in 'classesDir' as well as 'servicesFacadeClassesDir' (See task
below:)

task jarServiceFacade(type: Jar, dependsOn: compileServiceFacade) {
   baseName = 'ias_ta_common_service_facade'
   fileSet(dir: servicesFacadeClassesDir) {
      include("ie/vhi/ias/ta/common/services/facade/**")
   }
}

When I run gradle with the -d flag it reports:

- Creating archive: jarServiceFacade
- fileset: Setup scanner in dir
C:\workspace\Core\branches\TEMP_gradle\TA\ias_ta_common\build\classes
with patternSet{ includes: [] excludes: [] }
- fileset: Setup scanner in dir
C:\workspace\Core\branches\TEMP_gradle\TA\ias_ta_common\build\facade- cla
sses with patternSet{ includes:
[ie/vhi/ias/ta/common/services/facade/**] excludes: [] }

So it looks like the task 'jarServiceFacade' is inheriting something
that causes it to include classes found in 'classesDir'.

Have you any ideas as to why that may be?

This is a bug. Could you file a Jira with fix for 0.7?

Meanwhile you can use this hack as a work around:

task jarServiceFacade(type: Jar, dependsOn: compileServiceFacade) {
resourceCollections = [] // If this is null, the default value classesDir is used.
   baseName = 'ias_ta_common_service_facade'
   fileSet(dir: servicesFacadeClassesDir) {
      include("ie/vhi/ias/ta/common/services/facade/**")
   }
}

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org


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

   http://xircles.codehaus.org/manage_email


Reply via email to