I too am looking for a similar solution for my problem.
I have have 3 profiles right now. (dev/uat/prod)
To accomplish this I have each profile set a variable called 'env'. I then
have a dynamic resource directory used based on this env variable. The only
issue I have is that I need one of these 3 profiles to be used to create a
successful build. Here is how I setup the resources.
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources-${env}</directory>
</resource>
</resources>
I have tried to place the resources that I want in the default profile into
the standard 'resources' directory but these files are then not overwritten
if a profile is actually selected. If there was some way to have a default
profile if none is selected then this would be perfect for us.
Here is a simple test case that I used.
./resources/file1
./resources/file2
./resources-prod/file1
./resources-prod/file3
If I select to use the prod profile then I end up with
./target/classes/file1 (from ./resources)
./target/classes/file2 (from ./resources)
./target/classes/file3 (from ./resources-prod)
I would expect to see
./target/classes/file1 (from ./resources)
./target/classes/file2 (from ./resources-prod)
./target/classes/file3 (from ./resources-prod)
If if there is not a solution to this having the ability to force the
developer to use a profile would work as well. Maybe some sort of arrest
that a profile was selected.
So in the end, like Chis stated, I would love a solution to this problem.
Nathan
On 6/15/07, Chris Helck <[EMAIL PROTECTED]> wrote:
If you use activeByDefault then isn't the profile always active? I don't
believe you can have a default profile that is active if and only if no
other profile is active. If I'm wrong I'd love to know because I would
find this very useful.
Regards,
Christopher
-----Original Message-----
From: Arnaud HERITIER [mailto:[EMAIL PROTECTED]
Sent: Friday, June 15, 2007 2:02 PM
To: Maven Users List
Subject: Re: Profiles
yes you have to set the activeByDefault to true
http://maven.apache.org/ref/2.0.4/maven-settings/settings.html#class_act
ivation
Arnaud
On 15/06/07, Jon Strayer <[EMAIL PROTECTED]> wrote:
>
> Is it possible to have a default profile that is activated only when
> no other profile is activated?
>
> --
> Esse Quam Videre
> To Be, rather than to Seem
>
--
..........................................................
Arnaud HERITIER
..........................................................
OCTO Technology - [EMAIL PROTECTED]
www.octo.com | blog.octo.com
..........................................................
ASF - [EMAIL PROTECTED]
www.apache.org | maven.apache.org
...........................................................
**********************************************************************
This communication and all information (including, but not limited to,
market prices/levels and data) contained therein (the "Information") is
for informational purposes only, is confidential, may be legally
privileged and is the intellectual property of ICAP plc and its affiliates
("ICAP") or third parties. No confidentiality or privilege is waived or
lost by any mistransmission. The Information is not, and should not
be construed as, an offer, bid or solicitation in relation to any
financial instrument or as an official confirmation of any transaction.
The Information is not warranted, including, but not limited, as to
completeness, timeliness or accuracy and is subject to change
without notice. ICAP assumes no liability for use or misuse of the
Information. All representations and warranties are expressly
disclaimed. The Information does not necessarily reflect the views of
ICAP. Access to the Information by anyone else other than the
recipient is unauthorized and any disclosure, copying, distribution or
any action taken or omitted to be taken in reliance on it is prohibited.
If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and
notify the sender.
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]