You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jim Crossley <ji...@crossleys.org> on 2004/03/18 03:57:22 UTC
[REPOST] Properties and subprojects
Trying once again for a reply. Pretty please...
Jim Crossley <ji...@crossleys.org> writes:
> I know maven doesn't exactly support property inheritance just yet,
> but I'm wondering whether the following problem will be solved even
> when that day comes.
>
> My project has two war subprojects, an ear subproject, and a common
> jar subproject. Each war depends on the common jar and some external
> jars required both at compile and run time. The ear depends on the
> two wars.
>
> My problem is ear file bloat. Both wars packaged in the ear contain
> copies of the same external jars. I would prefer the wars not contain
> the external libs, but refer to common ones packaged in the root of
> the ear.
>
> But for testing, it's convenient to deploy the wars separately, in
> which case the external jars must be put in WEB-INF/lib.
>
> How do I arrange my ?ar.bundle dependency properties in the pom so
> that when I build the war subproject, the external jars are packaged
> with the war, and when I build the ear subproject, they are not?
>
> I've tried this: <war.bundle>${bundle.war}</war.bundle>
>
> And then in the root project.properties, I set bundle.war=false. In
> the war subproject I set bundle.war=true. But it seems the
> subproject's bundle.war property always takes precedence, whether I
> build from the root or not.
>
> Any other suggestions?
>
> Thanks,
> Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [REPOST] Properties and subprojects
Posted by Jim Crossley <ji...@crossleys.org>.
dion@multitask.com.au writes:
> Jim Crossley <ji...@crossleys.org> wrote on 18/03/2004 01:57:22 PM:
>
> > How do I arrange my ?ar.bundle dependency properties in the pom so
> > that when I build the war subproject, the external jars are
> > packaged with the war, and when I build the ear subproject, they
> > are not?
>
> Have a postGoal on war that uses a property set in the parent to
> remove the unwanted jars after the war creation?
That works, thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [REPOST] Properties and subprojects
Posted by di...@multitask.com.au.
Jim Crossley <ji...@crossleys.org> wrote on 18/03/2004 01:57:22 PM:
> Trying once again for a reply. Pretty please...
> > But for testing, it's convenient to deploy the wars separately, in
> > which case the external jars must be put in WEB-INF/lib.
> >
> > How do I arrange my ?ar.bundle dependency properties in the pom so
> > that when I build the war subproject, the external jars are packaged
> > with the war, and when I build the ear subproject, they are not?
> >
> > I've tried this: <war.bundle>${bundle.war}</war.bundle>
> >
> > And then in the root project.properties, I set bundle.war=false. In
> > the war subproject I set bundle.war=true. But it seems the
> > subproject's bundle.war property always takes precedence, whether I
> > build from the root or not.
> >
> > Any other suggestions?
Have a postGoal on war that uses a property set in the parent to remove
the unwanted jars after the war creation?
--
dIon Gillard, Multitask Consulting