Thanks

Does that mean the you have to be in the directory of the 'b-one-crm:babel' project and run the 'jar' task from there (with out the path prefix).

Out of inteterest, it would seem like an uncessessary limitation and detract a bit from the otherwise powerful gradle command-line:

E.g. instead of

  gradle a:b:c:jar d:e:deploy

you need

  cd a/b/c
  gradle jar
  cd ../../../d/e
  gradle deploy

which is a somewhat more verbose and and a bit disorienting (since you end up in a different directory).

Also there might not be any directory to go to if the hierarchie is built up in the settings file as it actually is in my case, where there is no 'babel' directory.

include\
    ...
    'b-one-crm:babel:ejb-api',
    'b-one-crm:babel:persistence',
    'b-one-crm:babel:ejb-impl',
    'b-one-crm:babel:war',
    ...

...
project(':b-one-crm:babel:ejb-api').projectDir = "$settingsDir/b-one-crm/babel-ejb-api" as File
project(':b-one-crm:babel:persistence').projectDir = "$settingsDir/b-one-crm/babel-persistence" as File
project(':b-one-crm:babel:ejb-impl').projectDir ="$settingsDir/b-one-crm/babel-ejb-impl" as File
project(':b-one-crm:babel:war').projectDir = "$settingsDir/b-one-crm/babel-war" as File
...

But maybe I haven't misunderstood you incorrectly..:-)

For the time being i'm resorting to injecting an empty 'jar' task and 'dependsOnChildren()' in to the 'babel' project to get this working.

Regards

Thor

Den 12-08-2011 19:27, Peter Niederwieser skrev:
Only a task name (e.g. "jar") will cascade; a task path (e.g.
"b-one-crm:babel:jar") won't.

--
Peter Niederwieser
Principal Engineer, Gradleware 
http://gradleware.com
Creator, Spock Framework 
http://spockframework.org
Twitter: @pniederw


Thor Kummer wrote:
Hello

The tutorial mentions that calling a task on a super-project will result 
in calling that task in each of the sub-projects.

 > The build is executed from the|water|project. 
Neither|water|nor|tropicalFish|have a
 > task with the name|distanceToIceberg|. Gradle does not care. The 
simple rule
 > mentioned already above is: Execute all tasks down the hierarchy 
which have this name.
 > Only complain if there is/no/such task!

But that is not what happens in my case:

----
07:50:49-tk@tk:~/workspace/com.one.crm>  gradle b-one-crm:babel:jar

FAILURE: Could not determine which tasks to execute.

* What went wrong:
Task 'jar' not found in project ':b-one-crm:babel'.

* Try:
Run gradle tasks to get a list of available tasks.

BUILD FAILED

Total time: 5.499 secs
---

But calling the task directly on the sub-project works fine:

---

07:51:34-tk@tk:~/workspace/com.one.crm>  gradle
b-one-crm:babel:ejb-api:jar
:b-one-crm:common-utils:compileJava UP-TO-DATE
:b-one-crm:common-utils:processResources UP-TO-DATE
:b-one-crm:common-utils:classes UP-TO-DATE
:b-one-crm:common-utils:jar UP-TO-DATE
:b-one-crm:common:ejb-api:compileJava UP-TO-DATE
:b-one-crm:common:ejb-api:processResources UP-TO-DATE
:b-one-crm:common:ejb-api:classes UP-TO-DATE
:b-one-crm:common:ejb-api:jar UP-TO-DATE
:b-one-crm:auth:ejb-api:compileJava UP-TO-DATE
:b-one-crm:auth:ejb-api:processResources UP-TO-DATE
:b-one-crm:auth:ejb-api:classes UP-TO-DATE
:b-one-crm:auth:ejb-api:jar UP-TO-DATE
:b-one-crm:babel:ejb-api:compileJava UP-TO-DATE
:b-one-crm:babel:ejb-api:processResources UP-TO-DATE
:b-one-crm:babel:ejb-api:classes UP-TO-DATE
:b-one-crm:babel:ejb-api:jar UP-TO-DATE

BUILD SUCCESSFUL

Total time: 8.501 secs

----

Any ideas?

Regards
Thor




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

    http://xircles.codehaus.org/manage_email


--
View this message in context: http://gradle.1045684.n5.nabble.com/Cascading-tasks-tp4692207p4694109.html
Sent from the gradle-user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to