(Sorry to be late to the conversation here, but I was reviewing and had
this to add)

In our build scripts where we weren't ready to define dependencies for a
project the "right" way, we just did providedCompile to relieve the
duplicate jar issue.

I think by default the war task copies runtime dependencies into the lib
dir, and since they're already there, it doesn't need to in this case.

If you did compile instead of providedCompile on the weblogic jars, they
would show up in your war as well.


Jeremy D. Young
Web Architect
O'Reilly Auto Parts

Ricardo Mayerhofer <[email protected]> wrote on 07/22/2011
05:50:42 PM:

> From: Ricardo Mayerhofer <[email protected]>
> To: [email protected]
> Date: 07/22/2011 05:57 PM
> Subject: [gradle-user] War packed with duplicated jars
>
> Hi all,
> I'm facing an issue when using war plugin. The resulting war is packed
with
> duplicated jars in WEB-INF/LIB folder (zip allows files with same name).
All
> jars are duplicated.
>
> The build script is quite simples and is listed below:
>
> apply plugin: 'war'
> apply from: 'xmlbeans.gradle'
>
> weblogicLibDirName =
> "${System.getenv()['BEA10_HOME']}/wlserver_10.0/server/lib"
> buildDir = file("../build")
>
> configurations {
>    xmlbeans { extendsFrom compile }
> }
>
> dependencies {
>    compile       fileTree(dir: "src/main/webapp/WEB-INF/lib",
> include: '*.jar')
>    providedCompile   fileTree(dir: weblogicLibDirName , include:
> 'weblogic.jar')
> }
>
> Any help is appreciated. Thanks.
>
> --
> View this message in context: http://gradle.1045684.n5.nabble.com/
> War-packed-with-duplicated-jars-tp4624905p4624905.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
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

This communication and any attachments are confidential, protected by 
Communications Privacy Act 18 USCS ยง 2510, solely for the use of the intended 
recipient, and may contain legally privileged material. If you are not the 
intended recipient, please return or destroy it immediately. Thank you.

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

    http://xircles.codehaus.org/manage_email


Reply via email to