Brett Cave wrote:
>
> When I run anything on the parent, PMD is executed:
> e.g. gradle compileJava
> "Running PMD code check on subproject1"
> "Running PMD code check on subproj2"
> "Running PMD code check on subproj3"
>
Your task definition is incorrect. It is printing the message and calling
the Ant task during the configuration phase, not during the execution phase.
Here is how to fix it:
task pmdCheck << { // notice the <<
println ...
ant { ... }
}
which is shorthand for:
task pmdCheck {
// any configuration goes here
doLast {
println ...
ant { ... }
}
}
--
Peter Niederwieser
Developer, Gradle
http://www.gradle.org
Trainer & Consultant, Gradle Inc.
http://www.gradle.biz
Creator, Spock Framework
http://spockframework.org
--
View this message in context:
http://gradle.1045684.n5.nabble.com/task-being-executed-without-explicitly-being-called-tp3387681p3387795.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