Yes, but the problem is that you end up with build information residing
outside of the POM. It's fine for properties that are developer-dependent (
e.g. app server's location on disk), but if the properties are
client-related (e.g. build the app for SiteA or for SiteB), it does not work
so well, because in order to build, you have to check out another file (
settings.xml).
I'm fairly new to maven and I don't understand the rationale for not
supporting profile inheritance.
I'm sure there is a good reason, I just don't see it.
Could somebody please shed some light on this?
Thanks,
T.
On 6/12/06, Ivo Limmen <[EMAIL PROTECTED]> wrote:
You can also put the profile in your global settings.xml. Then it will
work
for all your builds.
On 6/13/06, Toto Laricot <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have tried Kieran's solution myself; it works fine as long as the
> profiles
> are defined in the same POM that contains the variables that need to be
> injected.
>
> In other words –still using Kieran's example- if you define:
> <profile>
> <id>dev</id>
> […]
> <properties>
> <environment.name>dev</environment.name>
> </properties>
> […]
> </profile>
>
> in a parent POM, and this filter in a child POM:
>
> <filters>
> <filter>src/main/profiles/${delivery.name}/general-
filter.properties
> </filter>
>
> <filter>src/main/profiles/${delivery.name}/${environment.name}-
> filter.properties</filter>
> <filter>src/main/resources/${operatingsys.name}-filter.properties
> </filter>
>
> </filters>
>
> The properties won't be injected.
>
> So, if you have a hierarchy of POM's, you have to duplicate you profile
> definitions into every POM, which is a maintenance nightmare.
>
> I'd be curious to find out how people deal with this issue. Is the ant
> plugin the only solution? I sure hope not.
>
> Theo.
>
>
>
>
> On 6/12/06, badaud <[EMAIL PROTECTED]> wrote:
> >
> >
> > I will try something like this, thanks.
> > --
> > View this message in context:
> >
>
http://www.nabble.com/Best-practices-for-multi-flavour-build--t1741483.html#a4826563
> > Sent from the Maven - Users forum at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>