Since that is a task of type Sync, I'm surprised it ever worked, but I'm 
guessing that it was like the JavaExec task recently identified to always 
assume it was out-of-date, and that behavior was fixed in milestone-2.  Since 
no inputs or outputs are defined in the configuration phase, it seems that it 
should attempt to skip it.

You could simulate that behavior again by doing something like
deploy {
  onlyIf { true }
}

This should also work as well:

deploy.onlyIf { true }

Although, Adam will likely dig into the source and provide a better solution 
later :-)

-Spencer

--- On Tue, 4/19/11, Steve Appling <[email protected]> wrote:

From: Steve Appling <[email protected]>
Subject: [gradle-user] milestone 2 broke a task
To: [email protected]
Date: Tuesday, April 19, 2011, 11:43 AM

One of our tasks no longer works with milestone 2.  Is anyone aware of an 
intentional change that would have broken this, or is this a bug.
We have:
task deploy(description: 'Deploys the war to the webserver', type: Sync, 
dependsOn:[war])
deploy.doFirst {
   println "Deploying $war.baseName to ${getDeployLoc().canonicalPath}"
   from zipTree(war.archivePath)
   into getDeployLoc()
}

getDeployLoc is a helper method that needs to be only run if the deploy task is 
run, so we don't want to call it during the configuration phase.

This worked fine in milestone 1, but in milestone 2 I get "Skipping task 
':deploy' as it has no source files."

--
Steve Appling
Automated Logic Research Team





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

    http://xircles.codehaus.org/manage_email


Reply via email to