You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by amit kumar <am...@gmail.com> on 2008/02/04 19:58:19 UTC

build profiles

Hi,
I am trying to have different build profiles for my development
environment and integration environment. All I want is to have
different destination directories. My project has sub-modules and at
the time of Integration when I run the maven build for the parent
project, the destination directory that I want at the integration
environment gets overridden by the sub module directory tag.

I have tried something like this.

ParentProject
                   -pom.xml            have a profile with destination
directory say C:\final

                   -Child1                destination directory in the
build tag D:\dev

                   -Child2


When I run mvn install -P profile1.  The C:\final gets overridden by D:\dev.

How shall I go about it?


regards,
Amit

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: build profiles

Posted by Arash Bizhan zadeh <ar...@gmail.com>.
I noticed something that may help you here. All profiles are active by
default, so no matter what you pass in -P they will be in effect and the
last one will win.

-arash

On Feb 5, 2008 1:59 AM, amit kumar <am...@gmail.com> wrote:

> Thank you so much Allen. Been a great help.
> <directory> is not listed among them, but it is working for a single
> project that I tried to use different profiles. I would try with your
> suggestions and would let you know.
>
> Thanks and regards,
> Amit
>
> On Feb 5, 2008 2:11 AM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > Heh. I should take my own advice--when I was reviewing the profiles
> > intro I linked you to, it says:
> >
> > Profiles in pom.xml
> >
> > On the other hand, if your profiles can be reasonably specified inside
> > the POM, you have many more options. The trade-off, of course, is that
> > you can only modify that project and it's sub-modules. Since these
> > profiles are specified inline, and therefore have a better chance of
> > preserving portability, it's reasonable to say you can add more
> > information to them without the risk of that information being
> > unavailable to other users.
> >
> > Profiles specified in the POM can modify the following POM elements:
> >
> >     * <repositories>
> >     * <pluginRepositories>
> >     * <dependencies>
> >     * <plugins>
> >     * <properties> (not actually available in the main POM, but used
> > behind the scenes)
> >     * <modules>
> >     * <reporting>
> >     * <dependencyManagement>
> >     * <distributionManagement>
> > --->* a subset of the <build> element, which consists of:
> >           o <defaultGoal>
> >           o <resources>
> >           o <testResources>
> >           o <finalName>
> >
> >
> > Note that <directory> isn't listed among those. So, while I still think
> > you should have more than just the one profile to avoid confusing
> > defaults and precedences, one thing you'll have to do is put the
> > directory name into a <property> and then in your pom.xml files, have
> > <build>
> >
> > <directory>${whatever.you.called.the.directory.property}</directory>
> >         .
> >         .
> >         .
> > </build>
> >
> > ~DVA
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> >
> > Sent: Monday, February 04, 2008 3:18 PM
> > To: Maven Users List
> > Subject: Re: build profiles
> >
> > Actually the current setup is the most basic I guess. I was just
> > trying to separate development environment(destination directory for
> > the sub modules) an integration environment( the profile I want to use
> > to specify a location which would get inherited by every sub module so
> > that all of them could be at one place.)
> >
> > For sub modules I am define like.
> >
> > <build>
> > <directory>C:\Final</directory>
> > </build>
> >
> >
> > For parent project(parent of all) I am defining a profile( i think I
> > would have to, to achieve this separation) which would be used when
> > build would be triggered at the time ot Continuous Integration. I am
> > not defining anything else in this profile besides the destination
> > directory.
> >
> > <profiles>
> >     <profile>
> >       <id>int</id>
> >          <build>
> >         <directory>C:\Diff</directory>
> >      </build>
> >     </profile>
> >     </profiles>
> >
> >
> > something like mvn -P int
> >
> >
> > Amit
> >
> >
> > On Feb 4, 2008 1:47 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > > So... you're saying that your <profile> (profile1, according to your
> > > example command-line call below) is defined in/for the parent POM?
> > >
> > > I think I'm not 100% understanding your setup. Could you give me a
> > more
> > > detailed explanation of what profiles and properties you have defined,
> > > where those are, and which ones you do and don't want active? In fact,
> > > if you have some web space somewhere, maybe you could just upload your
> > > POMs and link to them?
> > >
> > > -----Original Message-----
> > > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > > Sent: Monday, February 04, 2008 2:33 PM
> > > To: Maven Users List
> > >
> > > Subject: Re: build profiles
> > >
> > > Currently i am not using any profile(tag) for sub modules, I am just
> > > mentioning <directory> tag inside <build> tag. Do i need to have
> > > separate profile to do that?
> > >
> > > regards,
> > > Amit
> > >
> > > On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > > > When I was doing profiles for the first time, I noticed that
> > anything
> > > I
> > > > put in profiles.xml was active by default, and that my dev profile
> > > > overrode my live release profile. This may be your problem. Try
> > > adding:
> > > >
> > > > <activation>
> > > >   <activeByDefault>false</activeByDefault>
> > > > </activation>
> > > >
> > > > to the dev profile that is currently overriding the other. In fact,
> > > this
> > > > may or may not be regarded by the community as a "best practice,"
> > (I'm
> > > > new at Maven too), but for a project where only one profile should
> > > ever
> > > > be active at a time, I add those lines to all the profiles, and then
> > > > just explicitly call the one I want at the command line with '-P
> > > > profile_name'.
> > > >
> > > > Hope that helps.
> > > > ~Dan Allen
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > > > Sent: Monday, February 04, 2008 1:58 PM
> > > > To: Maven Users List
> > > > Subject: build profiles
> > > >
> > > > Hi,
> > > > I am trying to have different build profiles for my development
> > > > environment and integration environment. All I want is to have
> > > > different destination directories. My project has sub-modules and at
> > > > the time of Integration when I run the maven build for the parent
> > > > project, the destination directory that I want at the integration
> > > > environment gets overridden by the sub module directory tag.
> > > >
> > > > I have tried something like this.
> > > >
> > > > ParentProject
> > > >                    -pom.xml            have a profile with
> > destination
> > > > directory say C:\final
> > > >
> > > >                    -Child1                destination directory in
> > the
> > > > build tag D:\dev
> > > >
> > > >                    -Child2
> > > >
> > > >
> > > > When I run mvn install -P profile1.  The C:\final gets overridden by
> > > > D:\dev.
> > > >
> > > > How shall I go about it?
> > > >
> > > >
> > > > regards,
> > > > Amit
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > > > --
> > > > This message may contain confidential, proprietary, or legally
> > > privileged information. No confidentiality or privilege is waived by
> > any
> > > transmission to an unintended recipient. If you are not an intended
> > > recipient, please notify the sender and delete this message
> > immediately.
> > > Any views expressed in this message are those of the sender, not those
> > > of any entity within the KBC Financial Products group of companies
> > > (together referred to as "KBC FP").
> > > >
> > > > This message does not create any obligation, contractual or
> > otherwise,
> > > on the part of KBC FP. It is not an offer (or solicitation of an
> > offer)
> > > of, or a recommendation to buy or sell, any financial product. Any
> > > prices or other values included in this message are indicative only,
> > and
> > > do not necessarily represent current market prices, prices at which
> > KBC
> > > FP would enter into a transaction, or prices at which similar
> > > transactions may be carried on KBC FP's own books. The information
> > > contained in this message is provided "as is", without representations
> > > or warranties, express or implied, of any kind. Past performance is
> > not
> > > indicative of future returns.
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived by any
> > transmission to an unintended recipient. If you are not an intended
> > recipient, please notify the sender and delete this message immediately.
> > Any views expressed in this message are those of the sender, not those
> > of any entity within the KBC Financial Products group of companies
> > (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or otherwise,
> > on the part of KBC FP. It is not an offer (or solicitation of an offer)
> > of, or a recommendation to buy or sell, any financial product. Any
> > prices or other values included in this message are indicative only, and
> > do not necessarily represent current market prices, prices at which KBC
> > FP would enter into a transaction, or prices at which similar
> > transactions may be carried on KBC FP's own books. The information
> > contained in this message is provided "as is", without representations
> > or warranties, express or implied, of any kind. Past performance is not
> > indicative of future returns.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> privileged information. No confidentiality or privilege is waived by any
> transmission to an unintended recipient. If you are not an intended
> recipient, please notify the sender and delete this message immediately. Any
> views expressed in this message are those of the sender, not those of any
> entity within the KBC Financial Products group of companies (together
> referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or otherwise,
> on the part of KBC FP. It is not an offer (or solicitation of an offer) of,
> or a recommendation to buy or sell, any financial product. Any prices or
> other values included in this message are indicative only, and do not
> necessarily represent current market prices, prices at which KBC FP would
> enter into a transaction, or prices at which similar transactions may be
> carried on KBC FP's own books. The information contained in this message is
> provided "as is", without representations or warranties, express or implied,
> of any kind. Past performance is not indicative of future returns.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
You can not depend on your eyes when your imagination is out of focus.

Re: build profiles

Posted by amit kumar <am...@gmail.com>.
Thank you so much Allen. Been a great help.
<directory> is not listed among them, but it is working for a single
project that I tried to use different profiles. I would try with your
suggestions and would let you know.

Thanks and regards,
Amit

On Feb 5, 2008 2:11 AM, Allen, Daniel <Da...@kbcfp.com> wrote:
> Heh. I should take my own advice--when I was reviewing the profiles
> intro I linked you to, it says:
>
> Profiles in pom.xml
>
> On the other hand, if your profiles can be reasonably specified inside
> the POM, you have many more options. The trade-off, of course, is that
> you can only modify that project and it's sub-modules. Since these
> profiles are specified inline, and therefore have a better chance of
> preserving portability, it's reasonable to say you can add more
> information to them without the risk of that information being
> unavailable to other users.
>
> Profiles specified in the POM can modify the following POM elements:
>
>     * <repositories>
>     * <pluginRepositories>
>     * <dependencies>
>     * <plugins>
>     * <properties> (not actually available in the main POM, but used
> behind the scenes)
>     * <modules>
>     * <reporting>
>     * <dependencyManagement>
>     * <distributionManagement>
> --->* a subset of the <build> element, which consists of:
>           o <defaultGoal>
>           o <resources>
>           o <testResources>
>           o <finalName>
>
>
> Note that <directory> isn't listed among those. So, while I still think
> you should have more than just the one profile to avoid confusing
> defaults and precedences, one thing you'll have to do is put the
> directory name into a <property> and then in your pom.xml files, have
> <build>
>
> <directory>${whatever.you.called.the.directory.property}</directory>
>         .
>         .
>         .
> </build>
>
> ~DVA
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
>
> Sent: Monday, February 04, 2008 3:18 PM
> To: Maven Users List
> Subject: Re: build profiles
>
> Actually the current setup is the most basic I guess. I was just
> trying to separate development environment(destination directory for
> the sub modules) an integration environment( the profile I want to use
> to specify a location which would get inherited by every sub module so
> that all of them could be at one place.)
>
> For sub modules I am define like.
>
> <build>
> <directory>C:\Final</directory>
> </build>
>
>
> For parent project(parent of all) I am defining a profile( i think I
> would have to, to achieve this separation) which would be used when
> build would be triggered at the time ot Continuous Integration. I am
> not defining anything else in this profile besides the destination
> directory.
>
> <profiles>
>     <profile>
>       <id>int</id>
>          <build>
>         <directory>C:\Diff</directory>
>      </build>
>     </profile>
>     </profiles>
>
>
> something like mvn -P int
>
>
> Amit
>
>
> On Feb 4, 2008 1:47 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > So... you're saying that your <profile> (profile1, according to your
> > example command-line call below) is defined in/for the parent POM?
> >
> > I think I'm not 100% understanding your setup. Could you give me a
> more
> > detailed explanation of what profiles and properties you have defined,
> > where those are, and which ones you do and don't want active? In fact,
> > if you have some web space somewhere, maybe you could just upload your
> > POMs and link to them?
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Monday, February 04, 2008 2:33 PM
> > To: Maven Users List
> >
> > Subject: Re: build profiles
> >
> > Currently i am not using any profile(tag) for sub modules, I am just
> > mentioning <directory> tag inside <build> tag. Do i need to have
> > separate profile to do that?
> >
> > regards,
> > Amit
> >
> > On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > > When I was doing profiles for the first time, I noticed that
> anything
> > I
> > > put in profiles.xml was active by default, and that my dev profile
> > > overrode my live release profile. This may be your problem. Try
> > adding:
> > >
> > > <activation>
> > >   <activeByDefault>false</activeByDefault>
> > > </activation>
> > >
> > > to the dev profile that is currently overriding the other. In fact,
> > this
> > > may or may not be regarded by the community as a "best practice,"
> (I'm
> > > new at Maven too), but for a project where only one profile should
> > ever
> > > be active at a time, I add those lines to all the profiles, and then
> > > just explicitly call the one I want at the command line with '-P
> > > profile_name'.
> > >
> > > Hope that helps.
> > > ~Dan Allen
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > > Sent: Monday, February 04, 2008 1:58 PM
> > > To: Maven Users List
> > > Subject: build profiles
> > >
> > > Hi,
> > > I am trying to have different build profiles for my development
> > > environment and integration environment. All I want is to have
> > > different destination directories. My project has sub-modules and at
> > > the time of Integration when I run the maven build for the parent
> > > project, the destination directory that I want at the integration
> > > environment gets overridden by the sub module directory tag.
> > >
> > > I have tried something like this.
> > >
> > > ParentProject
> > >                    -pom.xml            have a profile with
> destination
> > > directory say C:\final
> > >
> > >                    -Child1                destination directory in
> the
> > > build tag D:\dev
> > >
> > >                    -Child2
> > >
> > >
> > > When I run mvn install -P profile1.  The C:\final gets overridden by
> > > D:\dev.
> > >
> > > How shall I go about it?
> > >
> > >
> > > regards,
> > > Amit
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived by
> any
> > transmission to an unintended recipient. If you are not an intended
> > recipient, please notify the sender and delete this message
> immediately.
> > Any views expressed in this message are those of the sender, not those
> > of any entity within the KBC Financial Products group of companies
> > (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or
> otherwise,
> > on the part of KBC FP. It is not an offer (or solicitation of an
> offer)
> > of, or a recommendation to buy or sell, any financial product. Any
> > prices or other values included in this message are indicative only,
> and
> > do not necessarily represent current market prices, prices at which
> KBC
> > FP would enter into a transaction, or prices at which similar
> > transactions may be carried on KBC FP's own books. The information
> > contained in this message is provided "as is", without representations
> > or warranties, express or implied, of any kind. Past performance is
> not
> > indicative of future returns.
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> privileged information. No confidentiality or privilege is waived by any
> transmission to an unintended recipient. If you are not an intended
> recipient, please notify the sender and delete this message immediately.
> Any views expressed in this message are those of the sender, not those
> of any entity within the KBC Financial Products group of companies
> (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or otherwise,
> on the part of KBC FP. It is not an offer (or solicitation of an offer)
> of, or a recommendation to buy or sell, any financial product. Any
> prices or other values included in this message are indicative only, and
> do not necessarily represent current market prices, prices at which KBC
> FP would enter into a transaction, or prices at which similar
> transactions may be carried on KBC FP's own books. The information
> contained in this message is provided "as is", without representations
> or warranties, express or implied, of any kind. Past performance is not
> indicative of future returns.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: build profiles

Posted by "Allen, Daniel" <Da...@kbcfp.com>.
Heh. I should take my own advice--when I was reviewing the profiles
intro I linked you to, it says:

Profiles in pom.xml

On the other hand, if your profiles can be reasonably specified inside
the POM, you have many more options. The trade-off, of course, is that
you can only modify that project and it's sub-modules. Since these
profiles are specified inline, and therefore have a better chance of
preserving portability, it's reasonable to say you can add more
information to them without the risk of that information being
unavailable to other users.

Profiles specified in the POM can modify the following POM elements:

    * <repositories>
    * <pluginRepositories>
    * <dependencies>
    * <plugins>
    * <properties> (not actually available in the main POM, but used
behind the scenes)
    * <modules>
    * <reporting>
    * <dependencyManagement>
    * <distributionManagement>
--->* a subset of the <build> element, which consists of:
          o <defaultGoal>
          o <resources>
          o <testResources>
          o <finalName>


Note that <directory> isn't listed among those. So, while I still think
you should have more than just the one profile to avoid confusing
defaults and precedences, one thing you'll have to do is put the
directory name into a <property> and then in your pom.xml files, have
<build>
	
<directory>${whatever.you.called.the.directory.property}</directory>
	.
	.
	. 
</build>

~DVA

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Monday, February 04, 2008 3:18 PM
To: Maven Users List
Subject: Re: build profiles

Actually the current setup is the most basic I guess. I was just
trying to separate development environment(destination directory for
the sub modules) an integration environment( the profile I want to use
to specify a location which would get inherited by every sub module so
that all of them could be at one place.)

For sub modules I am define like.

<build>
<directory>C:\Final</directory>
</build>


For parent project(parent of all) I am defining a profile( i think I
would have to, to achieve this separation) which would be used when
build would be triggered at the time ot Continuous Integration. I am
not defining anything else in this profile besides the destination
directory.

<profiles>
    <profile>
      <id>int</id>
	 <build>
        <directory>C:\Diff</directory>
     </build>
    </profile>
    </profiles>


something like mvn -P int


Amit


On Feb 4, 2008 1:47 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> So... you're saying that your <profile> (profile1, according to your
> example command-line call below) is defined in/for the parent POM?
>
> I think I'm not 100% understanding your setup. Could you give me a
more
> detailed explanation of what profiles and properties you have defined,
> where those are, and which ones you do and don't want active? In fact,
> if you have some web space somewhere, maybe you could just upload your
> POMs and link to them?
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Monday, February 04, 2008 2:33 PM
> To: Maven Users List
>
> Subject: Re: build profiles
>
> Currently i am not using any profile(tag) for sub modules, I am just
> mentioning <directory> tag inside <build> tag. Do i need to have
> separate profile to do that?
>
> regards,
> Amit
>
> On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > When I was doing profiles for the first time, I noticed that
anything
> I
> > put in profiles.xml was active by default, and that my dev profile
> > overrode my live release profile. This may be your problem. Try
> adding:
> >
> > <activation>
> >   <activeByDefault>false</activeByDefault>
> > </activation>
> >
> > to the dev profile that is currently overriding the other. In fact,
> this
> > may or may not be regarded by the community as a "best practice,"
(I'm
> > new at Maven too), but for a project where only one profile should
> ever
> > be active at a time, I add those lines to all the profiles, and then
> > just explicitly call the one I want at the command line with '-P
> > profile_name'.
> >
> > Hope that helps.
> > ~Dan Allen
> >
> >
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Monday, February 04, 2008 1:58 PM
> > To: Maven Users List
> > Subject: build profiles
> >
> > Hi,
> > I am trying to have different build profiles for my development
> > environment and integration environment. All I want is to have
> > different destination directories. My project has sub-modules and at
> > the time of Integration when I run the maven build for the parent
> > project, the destination directory that I want at the integration
> > environment gets overridden by the sub module directory tag.
> >
> > I have tried something like this.
> >
> > ParentProject
> >                    -pom.xml            have a profile with
destination
> > directory say C:\final
> >
> >                    -Child1                destination directory in
the
> > build tag D:\dev
> >
> >                    -Child2
> >
> >
> > When I run mvn install -P profile1.  The C:\final gets overridden by
> > D:\dev.
> >
> > How shall I go about it?
> >
> >
> > regards,
> > Amit
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> privileged information. No confidentiality or privilege is waived by
any
> transmission to an unintended recipient. If you are not an intended
> recipient, please notify the sender and delete this message
immediately.
> Any views expressed in this message are those of the sender, not those
> of any entity within the KBC Financial Products group of companies
> (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or
otherwise,
> on the part of KBC FP. It is not an offer (or solicitation of an
offer)
> of, or a recommendation to buy or sell, any financial product. Any
> prices or other values included in this message are indicative only,
and
> do not necessarily represent current market prices, prices at which
KBC
> FP would enter into a transaction, or prices at which similar
> transactions may be carried on KBC FP's own books. The information
> contained in this message is provided "as is", without representations
> or warranties, express or implied, of any kind. Past performance is
not
> indicative of future returns.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided "as is", without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: build profiles

Posted by "Allen, Daniel" <Da...@kbcfp.com>.
I *think* properties straight from a POM override those from a profile.
(Anyone more expert than myself, please correct me if I'm wrong)

I would recommend moving the submodules' directory settings into a
profile also, so that you can explicitly state at the command line which
you want active. If the child and parent need to go to different places
during the same build, consider having a separate profiles.xml, whose
<profile> elements would contain <properties> for each different
directory (and then you could refer to them in the pom as ${properties}:
"<directory>${build.directory.for.this.pom}</directory>"). I'm not
completely sure how you should be arranging them, since I don't know the
details of your project. But I think consistency in having the
<directory> set by a profile in all cases would fix your issue of
unwanted precendence order. 

Anyway, check out
http://maven.apache.org/guides/introduction/introduction-to-profiles.htm
l if you haven't already. Aside from a pretty good explanation of how
profiles work, one of the most useful things in there is the command
'mvn help:active-profiles', which will list what profiles are active, so
you can see if any are being activated when they shouldn't.

Hope that helps,
~Dan Allen

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Monday, February 04, 2008 3:18 PM
To: Maven Users List
Subject: Re: build profiles

Actually the current setup is the most basic I guess. I was just
trying to separate development environment(destination directory for
the sub modules) an integration environment( the profile I want to use
to specify a location which would get inherited by every sub module so
that all of them could be at one place.)

For sub modules I am define like.

<build>
<directory>C:\Final</directory>
</build>


For parent project(parent of all) I am defining a profile( i think I
would have to, to achieve this separation) which would be used when
build would be triggered at the time ot Continuous Integration. I am
not defining anything else in this profile besides the destination
directory.

<profiles>
    <profile>
      <id>int</id>
	 <build>
        <directory>C:\Diff</directory>
     </build>
    </profile>
    </profiles>


something like mvn -P int


Amit


On Feb 4, 2008 1:47 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> So... you're saying that your <profile> (profile1, according to your
> example command-line call below) is defined in/for the parent POM?
>
> I think I'm not 100% understanding your setup. Could you give me a
more
> detailed explanation of what profiles and properties you have defined,
> where those are, and which ones you do and don't want active? In fact,
> if you have some web space somewhere, maybe you could just upload your
> POMs and link to them?
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Monday, February 04, 2008 2:33 PM
> To: Maven Users List
>
> Subject: Re: build profiles
>
> Currently i am not using any profile(tag) for sub modules, I am just
> mentioning <directory> tag inside <build> tag. Do i need to have
> separate profile to do that?
>
> regards,
> Amit
>
> On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > When I was doing profiles for the first time, I noticed that
anything
> I
> > put in profiles.xml was active by default, and that my dev profile
> > overrode my live release profile. This may be your problem. Try
> adding:
> >
> > <activation>
> >   <activeByDefault>false</activeByDefault>
> > </activation>
> >
> > to the dev profile that is currently overriding the other. In fact,
> this
> > may or may not be regarded by the community as a "best practice,"
(I'm
> > new at Maven too), but for a project where only one profile should
> ever
> > be active at a time, I add those lines to all the profiles, and then
> > just explicitly call the one I want at the command line with '-P
> > profile_name'.
> >
> > Hope that helps.
> > ~Dan Allen
> >
> >
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Monday, February 04, 2008 1:58 PM
> > To: Maven Users List
> > Subject: build profiles
> >
> > Hi,
> > I am trying to have different build profiles for my development
> > environment and integration environment. All I want is to have
> > different destination directories. My project has sub-modules and at
> > the time of Integration when I run the maven build for the parent
> > project, the destination directory that I want at the integration
> > environment gets overridden by the sub module directory tag.
> >
> > I have tried something like this.
> >
> > ParentProject
> >                    -pom.xml            have a profile with
destination
> > directory say C:\final
> >
> >                    -Child1                destination directory in
the
> > build tag D:\dev
> >
> >                    -Child2
> >
> >
> > When I run mvn install -P profile1.  The C:\final gets overridden by
> > D:\dev.
> >
> > How shall I go about it?
> >
> >
> > regards,
> > Amit
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> privileged information. No confidentiality or privilege is waived by
any
> transmission to an unintended recipient. If you are not an intended
> recipient, please notify the sender and delete this message
immediately.
> Any views expressed in this message are those of the sender, not those
> of any entity within the KBC Financial Products group of companies
> (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or
otherwise,
> on the part of KBC FP. It is not an offer (or solicitation of an
offer)
> of, or a recommendation to buy or sell, any financial product. Any
> prices or other values included in this message are indicative only,
and
> do not necessarily represent current market prices, prices at which
KBC
> FP would enter into a transaction, or prices at which similar
> transactions may be carried on KBC FP's own books. The information
> contained in this message is provided "as is", without representations
> or warranties, express or implied, of any kind. Past performance is
not
> indicative of future returns.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided "as is", without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: build profiles

Posted by amit kumar <am...@gmail.com>.
Actually the current setup is the most basic I guess. I was just
trying to separate development environment(destination directory for
the sub modules) an integration environment( the profile I want to use
to specify a location which would get inherited by every sub module so
that all of them could be at one place.)

For sub modules I am define like.

<build>
<directory>C:\Final</directory>
</build>


For parent project(parent of all) I am defining a profile( i think I
would have to, to achieve this separation) which would be used when
build would be triggered at the time ot Continuous Integration. I am
not defining anything else in this profile besides the destination
directory.

<profiles>
    <profile>
      <id>int</id>
	 <build>
        <directory>C:\Diff</directory>
     </build>
    </profile>
    </profiles>


something like mvn -P int


Amit


On Feb 4, 2008 1:47 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> So... you're saying that your <profile> (profile1, according to your
> example command-line call below) is defined in/for the parent POM?
>
> I think I'm not 100% understanding your setup. Could you give me a more
> detailed explanation of what profiles and properties you have defined,
> where those are, and which ones you do and don't want active? In fact,
> if you have some web space somewhere, maybe you could just upload your
> POMs and link to them?
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Monday, February 04, 2008 2:33 PM
> To: Maven Users List
>
> Subject: Re: build profiles
>
> Currently i am not using any profile(tag) for sub modules, I am just
> mentioning <directory> tag inside <build> tag. Do i need to have
> separate profile to do that?
>
> regards,
> Amit
>
> On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> > When I was doing profiles for the first time, I noticed that anything
> I
> > put in profiles.xml was active by default, and that my dev profile
> > overrode my live release profile. This may be your problem. Try
> adding:
> >
> > <activation>
> >   <activeByDefault>false</activeByDefault>
> > </activation>
> >
> > to the dev profile that is currently overriding the other. In fact,
> this
> > may or may not be regarded by the community as a "best practice," (I'm
> > new at Maven too), but for a project where only one profile should
> ever
> > be active at a time, I add those lines to all the profiles, and then
> > just explicitly call the one I want at the command line with '-P
> > profile_name'.
> >
> > Hope that helps.
> > ~Dan Allen
> >
> >
> >
> > -----Original Message-----
> > From: amit kumar [mailto:amit.kumar97400@gmail.com]
> > Sent: Monday, February 04, 2008 1:58 PM
> > To: Maven Users List
> > Subject: build profiles
> >
> > Hi,
> > I am trying to have different build profiles for my development
> > environment and integration environment. All I want is to have
> > different destination directories. My project has sub-modules and at
> > the time of Integration when I run the maven build for the parent
> > project, the destination directory that I want at the integration
> > environment gets overridden by the sub module directory tag.
> >
> > I have tried something like this.
> >
> > ParentProject
> >                    -pom.xml            have a profile with destination
> > directory say C:\final
> >
> >                    -Child1                destination directory in the
> > build tag D:\dev
> >
> >                    -Child2
> >
> >
> > When I run mvn install -P profile1.  The C:\final gets overridden by
> > D:\dev.
> >
> > How shall I go about it?
> >
> >
> > regards,
> > Amit
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> privileged information. No confidentiality or privilege is waived by any
> transmission to an unintended recipient. If you are not an intended
> recipient, please notify the sender and delete this message immediately.
> Any views expressed in this message are those of the sender, not those
> of any entity within the KBC Financial Products group of companies
> (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or otherwise,
> on the part of KBC FP. It is not an offer (or solicitation of an offer)
> of, or a recommendation to buy or sell, any financial product. Any
> prices or other values included in this message are indicative only, and
> do not necessarily represent current market prices, prices at which KBC
> FP would enter into a transaction, or prices at which similar
> transactions may be carried on KBC FP's own books. The information
> contained in this message is provided "as is", without representations
> or warranties, express or implied, of any kind. Past performance is not
> indicative of future returns.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: build profiles

Posted by "Allen, Daniel" <Da...@kbcfp.com>.
So... you're saying that your <profile> (profile1, according to your
example command-line call below) is defined in/for the parent POM?

I think I'm not 100% understanding your setup. Could you give me a more
detailed explanation of what profiles and properties you have defined,
where those are, and which ones you do and don't want active? In fact,
if you have some web space somewhere, maybe you could just upload your
POMs and link to them?

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Monday, February 04, 2008 2:33 PM
To: Maven Users List
Subject: Re: build profiles

Currently i am not using any profile(tag) for sub modules, I am just
mentioning <directory> tag inside <build> tag. Do i need to have
separate profile to do that?

regards,
Amit

On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> When I was doing profiles for the first time, I noticed that anything
I
> put in profiles.xml was active by default, and that my dev profile
> overrode my live release profile. This may be your problem. Try
adding:
>
> <activation>
>   <activeByDefault>false</activeByDefault>
> </activation>
>
> to the dev profile that is currently overriding the other. In fact,
this
> may or may not be regarded by the community as a "best practice," (I'm
> new at Maven too), but for a project where only one profile should
ever
> be active at a time, I add those lines to all the profiles, and then
> just explicitly call the one I want at the command line with '-P
> profile_name'.
>
> Hope that helps.
> ~Dan Allen
>
>
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Monday, February 04, 2008 1:58 PM
> To: Maven Users List
> Subject: build profiles
>
> Hi,
> I am trying to have different build profiles for my development
> environment and integration environment. All I want is to have
> different destination directories. My project has sub-modules and at
> the time of Integration when I run the maven build for the parent
> project, the destination directory that I want at the integration
> environment gets overridden by the sub module directory tag.
>
> I have tried something like this.
>
> ParentProject
>                    -pom.xml            have a profile with destination
> directory say C:\final
>
>                    -Child1                destination directory in the
> build tag D:\dev
>
>                    -Child2
>
>
> When I run mvn install -P profile1.  The C:\final gets overridden by
> D:\dev.
>
> How shall I go about it?
>
>
> regards,
> Amit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided "as is", without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: build profiles

Posted by amit kumar <am...@gmail.com>.
Currently i am not using any profile(tag) for sub modules, I am just
mentioning <directory> tag inside <build> tag. Do i need to have
separate profile to do that?

regards,
Amit

On Feb 4, 2008 1:03 PM, Allen, Daniel <Da...@kbcfp.com> wrote:
> When I was doing profiles for the first time, I noticed that anything I
> put in profiles.xml was active by default, and that my dev profile
> overrode my live release profile. This may be your problem. Try adding:
>
> <activation>
>   <activeByDefault>false</activeByDefault>
> </activation>
>
> to the dev profile that is currently overriding the other. In fact, this
> may or may not be regarded by the community as a "best practice," (I'm
> new at Maven too), but for a project where only one profile should ever
> be active at a time, I add those lines to all the profiles, and then
> just explicitly call the one I want at the command line with '-P
> profile_name'.
>
> Hope that helps.
> ~Dan Allen
>
>
>
> -----Original Message-----
> From: amit kumar [mailto:amit.kumar97400@gmail.com]
> Sent: Monday, February 04, 2008 1:58 PM
> To: Maven Users List
> Subject: build profiles
>
> Hi,
> I am trying to have different build profiles for my development
> environment and integration environment. All I want is to have
> different destination directories. My project has sub-modules and at
> the time of Integration when I run the maven build for the parent
> project, the destination directory that I want at the integration
> environment gets overridden by the sub module directory tag.
>
> I have tried something like this.
>
> ParentProject
>                    -pom.xml            have a profile with destination
> directory say C:\final
>
>                    -Child1                destination directory in the
> build tag D:\dev
>
>                    -Child2
>
>
> When I run mvn install -P profile1.  The C:\final gets overridden by
> D:\dev.
>
> How shall I go about it?
>
>
> regards,
> Amit
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> --
> This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: build profiles

Posted by "Allen, Daniel" <Da...@kbcfp.com>.
When I was doing profiles for the first time, I noticed that anything I
put in profiles.xml was active by default, and that my dev profile
overrode my live release profile. This may be your problem. Try adding:

<activation>
  <activeByDefault>false</activeByDefault>
</activation>

to the dev profile that is currently overriding the other. In fact, this
may or may not be regarded by the community as a "best practice," (I'm
new at Maven too), but for a project where only one profile should ever
be active at a time, I add those lines to all the profiles, and then
just explicitly call the one I want at the command line with '-P
profile_name'.

Hope that helps.
~Dan Allen
 

-----Original Message-----
From: amit kumar [mailto:amit.kumar97400@gmail.com] 
Sent: Monday, February 04, 2008 1:58 PM
To: Maven Users List
Subject: build profiles

Hi,
I am trying to have different build profiles for my development
environment and integration environment. All I want is to have
different destination directories. My project has sub-modules and at
the time of Integration when I run the maven build for the parent
project, the destination directory that I want at the integration
environment gets overridden by the sub module directory tag.

I have tried something like this.

ParentProject
                   -pom.xml            have a profile with destination
directory say C:\final

                   -Child1                destination directory in the
build tag D:\dev

                   -Child2


When I run mvn install -P profile1.  The C:\final gets overridden by
D:\dev.

How shall I go about it?


regards,
Amit

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org