This is definitely an annoyance, and is something that is currently "solved" by 
duplicating the providedCompile and providedRuntime  for each of the war 
projects.  Clearly not the desired long-term solution.


Both providedCompile and providedRuntime are by default set to false for 
visibility outside of the project, so it isn't even easy to do the additional 
wiring from the using project.

I'm not currently looking into addressing this - at least until I can verify 
that making life potentially a bit more difficult for maven deployment with 
multiple artifacts (i.e. jar and war both being added to archives).


-Spencer




>________________________________
>From: davide.cavestro <davide.caves...@cardinis.com>
>To: user@gradle.codehaus.org
>Sent: Monday, October 3, 2011 10:01 AM
>Subject: [gradle-user] War plugin evolution and overlays
>
>Hi guys, 
>same old story ... I'm trying to get a valuable war overlay introducing
>dependencies between war projects, making a war project export the jar as
>main artifact and including contents from other wars.
>
>Now the problem is that given two war projects /war1/ and /war2/, if I
>introduce on /war2/ a compile dependency on /war1/, then the
>/providedCompile/ deps of /war1/ are somewhat inherited as /compile/ deps
>for /war2/, hence included into the generated war.
>
>
>
>multiproject structure
>
>
>/war1/ build script
>
>
>/war2/ build script
>
>
>So while war1.war contents are
>
>
>war2.war contents are
>
>
>Now the questions:
>Q1: wouldn't it be good if the war plugin could manage dependencies between
>war projects (not necessarily /compile/ deps... maybe we need a special
>configuration) interpreting them as a way to merge webapp contents and their
>dependencies (including the right semantic for provided ones)... I know
>Spencer Allain is working on some changes for the war plugin, but I don't
>know if there are any plans on this (or similar) direction
>Q2: how could I distinguish provided deps from others in my example?
>I guess I could compose the war simply copying resources from the webapp dir
>of war1, but this way I'd loose any additional content included by war1 with
>custom logic.
>
>Cheers
>Davide
>
>--
>View this message in context: 
>http://gradle.1045684.n5.nabble.com/War-plugin-evolution-and-overlays-tp4864964p4864964.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
>
>
>
>
>

Reply via email to