I'm glad to hear at least the -P approach is working for you. I understand your desire to encapsulate the default behavior inside a profile. It's something that didn't dawn on me when I implemented something similar. I just put my default behavior right in the relevant <build> section of the pom.xml. That gets executed in the common case of not specifying any profile. Then I have a profile that overrides those default setts.
Greg Vaughn [EMAIL PROTECTED] "Mick Knutson" <[EMAIL PROTECTED]> wrote on 10/19/2006 10:24:27 AM: > Everything seems to work if I FORCE the -P on the command line. > > My issue now is that I want to run without the -P on the command line as > well to use the default profile, but that does not seem to work. If I use > profiles, I must ALWAYS specify the profiles. > > Is there a way around this? > > > > On 10/19/06, Attila Mezei-Horvati <[EMAIL PROTECTED]> wrote: > > > > Mick, > > > > I just discovered how to use profiles myself. I hope > > the following will help. > > First, you don't need to run mvn always and check the > > end results to make sure everything is alright. > > > > Just do: > > mvn help:active-profiles > > and it will list you all the profiles which will be > > used. > > > > In my case I could get profiles working in one of > > these ways: > > 1. add activeprofile to settings.xml > > <activeProfiles> > > <activeProfile>default</activeProfile> > > </activeProfiles> > > > > 2. specify profiles as param values as: > > > > <profile> > > <id>skipunittest</id> > > <properties> > > > > <maven.test.skip>true</maven.test.skip> > > </properties> > > <activation> > > <property> > > <name>test</name> > > </property> > > </activation> > > </profile> > > then call > > > > mvn help:active-profiles -Dtest > > or > > mvn install -Dtest > > > > etc.. Note that each property is a separate param as > > mvn help:active-profiles -Dtest -DtoProduction -Dmyapp > > > > where test, toProduction, myapp are different profiles > > I want to enable. > > > > I couldn't get -P to use the correct profiles. Env I > > think it worked but it is more to type. :) > > > > See also this link for more info: > > http://maven.apache.org/guides/introduction/introduction-to-profiles.html > > > > good luck, > > Attila > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Thanks > > DJ MICK > http://www.djmick.com > http://www.myspace.com/mickknutson ====================================================================== Confidentiality Notice: The information contained in and transmitted with this communication is strictly confidential, is intended only for the use of the intended recipient, and is the property of Countrywide Financial Corporation or its affiliates and subsidiaries. If you are not the intended recipient, you are hereby notified that any use of the information contained in or transmitted with the communication or dissemination, distribution, or copying of this communication is strictly prohibited by law. If you have received this communication in error, please immediately return this communication to the sender and delete the original message and any copy of it in your possession. ======================================================================
