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




Em 14 de fevereiro de 2012 13:26, Rene Groeschke <gra...@breskeby.com>escreveu:

> Hi Jefferson,
> your dependency isn't added to the war because you declared it as
> providedCompile and runtime dependency. You should avoid to declare the
> same dependency for two scopes. Behind the scenes, gradle filters every
> dependency that is declared as providedCompile dependency when the war is
> created. Since your runtime dependency is exactly the same as your
> providedCompile dependency. Normally there is no reason for adding your
> dependency as providedCompile and Runtime. Instead you should just add it
> as "compile" dependency.
>
> regards,
> René
>
>
>
> --
> --
> Rene Groeschke
> @breskeby
>
> Principal Engineer,
> Gradleware Inc. - Gradle Training, Support, Consulting
> rene.groesc...@gradleware.com
> http://gradleware.com
>
>
>   Jefferson Magno Solfarello <jmagno...@gmail.com>
>  14. Februar 2012 14:39
>  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
>
> ------------------------------
>
>
>

<<compose-unknown-contact.jpg>>

Reply via email to