Szczepan Faber wrote:
>
> Ok, I figured that out. The way you refer to the task while setting
> the 'dependsOn' is incorrect:
>
> {code}
> //correct: you're actually creating an empty task here:
> jar.dependsOn task(':foo:bar')
>
> //correct: you refer to an existing task
> jar.dependsOn ':foo:bar'
> {code}
>
> However, you have actually found a bug :) Gradle should throw an
> exception saying that you cannot add ':api:pricing:copyDataSource'
> task because it already exists. See docs on the task method:
> http://gradle.org/current/docs/dsl/org.gradle.api.Project.html#org.gradle.api.Project:task(java.lang.String)
>
> I'll update the jira ticket accordingly.
> Cheers!
>
I updated my code as you suggested, but I get the following exception with
the code configured that way:
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':api:pricing:jar'.
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option
to get more log output.
BUILD FAILED
{code}
project(':api:pricing') {
version = 1.0
dependencies { compile project(':api:util') compile
'org.springframework:spring:2.5.6.SEC01' compile
'org.drools:drools-core:5.0.1' compile 'org.drools:drools-api:5.0.1' compile
'org.drools:drools-compiler:5.0.1' }
task copyDatasource(type: Copy) {//copy our <datasource>.xml into
dpu-datasource.xml from('/datasource/') into('src/main/resources/')
include(datasource + '.xml') rename(datasource + '.xml',
'pricing-datasource.xml') }
jar.dependsOn ':api:pricing:copyDataSource'
}
{/code}
So the issue isn't resolved, but I'm not sure how to change the status of
the bug back to open
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Command-line-P-property-not-propagating-to-dependencies-tp4459390p4488341.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