Hi /zhwa
Since you are writing task startJboss << { ... } instead of task startJboss {
... }, you are configuring the Exec task while it is being executed. That's too
late.
This happens during the configuration phase:
task startJboss { ... }
This happens during the execution phase:
task startJboss << { ... }
Configuring a task must happen during the Gradle configuration phase. The task
can then be executed properly during the Gradle execution phasee.
Regards, Etienne
On 01.03.2011, at 14:55, netextzhwa wrote:
> Hi, I'm trying to start and stop jboss with gradle exec task, but I keep
> getting this "execCommand == null" error. This is the task I tring to use, I
> couldn't figure out where is the problem...
>
> task startJboss(dependsOn:'copyToJboss', type:Exec) << {
> def jbossHome= 'C:/tools/jboss-4.0.5.GA'
> println "starting jboss at ${jbossHome}/bin/run.bat"
> workingDir = '${jbossHome}/bin'
> commandLine = ['run.bat']
>
> }
>
> error: execCommand == null!
>
> Many thanks.
>
> /zhwa
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/problem-with-start-stop-jboss-with-gradle-exec-task-tp3404960p3404960.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
>
>
Etienne Studer
Senior Software Developer
Canoo Engineering AG
Kirschgartenstrasse 5
CH-4051 Basel
T +41 61 228 94 44
F +41 61 228 94 49
[email protected]
www.canoo.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email