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]
>
>


Reply via email to