Hello Jefferson,
have a look at Gradle DSL Documentation at
http://gradle.org/docs/current/dsl/index.html.
There you can find a
chapter about Gradle Tasks
(
http://gradle.org/docs/current/dsl/org.gradle.api.Task.html).
You can
use the onlyIf and didWork properties to skip the uploadArchives task
when the war is up-to-date:
--------------
uploadArchives {
onlyIf { war.didWork }
}
--------------
regards,
René
Hi René, thanks for the
clarification! That is exactly what worked for me!
If
you don't mind, I have another quick question: when I run two times the
task uploadArchives on a war project, I can notice that all the
previous tasks are UP-TO-DATE but it looks that the uploadArchives is
always executed.
Is there a reason for that? If the war task is
UP-TO-DATE, is there a way to skip the execution of uploadArchives?
Thanks
a lot,
Jefferson
Hi guys, I have a question
related to the War plugin.
My war project
depends on another (path: ':bp.jars', configuration: 'search') at
compile time.
It also needs the jar files on the lib dir of
generated war file.
The documentation says "All the dependencies of the
runtime configuration are copied to WEB-INF/lib".
But I tried
the following, without success (the jars were not been included into the
generated war file):
dependencies {
providedCompile
project(path: ':bp.jars', configuration: 'search')
runtime project(path:
':bp.jars', configuration: 'search')
}
After many tries, It is now working when
I use:
dependencies {
compile project(path:
':bp.jars', configuration: 'search')
}
Why the jars are not included when I use
runtime configuration, but are included when I use compile
configuration?
Thanks a lot,
Jefferson