You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ej...@upromise.com> on 2006/04/14 00:15:09 UTC

Two new questions

1 - Is there any way to make a profile stored in profiles.xml the
default active profile?  I don't see a way to do that unless the profile
I want is in the pom.xml (I don't want to do this).
 
2 - Is there a way from a top level directory to say "compile module-A
only", or do I have to change directories to module-A and do a mvn
compile each time?

Re: Two new questions

Posted by Edwin Punzalan <ep...@exist.com>.
For #2,  you can use "mvn -f /path/to/pom.xml"... mvn changes dir for 
you and runs itself there

Arik Kfir wrote:
> Hi EJ,
>
> 1. Yes - see the reference to settings.xml at
> http://maven.apache.org/maven-settings/settings.html - especially about
> "<activeProfiles>". You can add your profile there (in settings.xml, under
> "<profiles>") and then add this:
> <activeProfiles>
>   <!-- you can add more than one active-by-default profiles here... -->
>   <activeProfile>myProfileName</activeProfile>
> </activeProfiles>
>
> 2. AFAIK, no.
>
> Hope this helps,
>   Arik.
>
> On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
>   
>> 1 - Is there any way to make a profile stored in profiles.xml the
>> default active profile?  I don't see a way to do that unless the profile
>> I want is in the pom.xml (I don't want to do this).
>>
>> 2 - Is there a way from a top level directory to say "compile module-A
>> only", or do I have to change directories to module-A and do a mvn
>> compile each time?
>>
>>
>>     

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


Re: Two new questions

Posted by Arik Kfir <ar...@gmail.com>.
You won't have to activate it - if you list it in <activeProfiles> it's
automatically activated...perhaps I misunderstood what you meant originaly?

On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
>
> 1 - that's not quite what I had in mind.  There's no way to activate that
> profile in profiles.xml from the pom.xml?  What if there are no profiles
> in settings.xml?
>
> 2 - bummer - anyone else know?
> -----Original Message-----
> From: Arik Kfir [mailto:arikkfir@gmail.com]
> Sent: Thu 4/13/2006 6:22 PM
> To: Maven Users List
> Subject: Re: Two new questions
>
> Hi EJ,
>
> 1. Yes - see the reference to settings.xml at
> http://maven.apache.org/maven-settings/settings.html - especially about
> "<activeProfiles>". You can add your profile there (in settings.xml, under
> "<profiles>") and then add this:
> <activeProfiles>
>   <!-- you can add more than one active-by-default profiles here... -->
>   <activeProfile>myProfileName</activeProfile>
> </activeProfiles>
>
> 2. AFAIK, no.
>
> Hope this helps,
>   Arik.
>
> On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
> >
> > 1 - Is there any way to make a profile stored in profiles.xml the
> > default active profile?  I don't see a way to do that unless the profile
> > I want is in the pom.xml (I don't want to do this).
> >
> > 2 - Is there a way from a top level directory to say "compile module-A
> > only", or do I have to change directories to module-A and do a mvn
> > compile each time?
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Two new questions

Posted by Tom Huybrechts <to...@gmail.com>.
On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
>
> 1 - that's not quite what I had in mind.  There's no way to activate that
> profile in profiles.xml from the pom.xml?  What if there are no profiles
> in settings.xml?


If you want to define the profile in settings.xml, but activate it in a pom,
you could use properties.

In settings.xml, specify the name of the property

<profiles>
  <profile>
    <activation>
      <property>
        <name>debug</name>
      </property>
    </activation>
    ...
  </profile>
</profiles>

or

<profiles>
  <profile>
    <activation>
      <property>
        <name>environment</name>
        <value>test</value>
      </property>
    </activation>
    ...
  </profile>


</profiles>



If you then set the property in your pom.xml, then the profile will be
activated (if the property is present in the first case, if it has the right
value in the second case).


2 - bummer - anyone else know?



It's probably not what you had in mind, but you could say 'mvn -f
moduleA/pom.xml compile'

Tom

RE: Two new questions

Posted by EJ Ciramella <ej...@upromise.com>.
1 - that's not quite what I had in mind.  There's no way to activate that profile in profiles.xml from the pom.xml?  What if there are no profiles in settings.xml?

2 - bummer - anyone else know?
-----Original Message-----
From: Arik Kfir [mailto:arikkfir@gmail.com]
Sent: Thu 4/13/2006 6:22 PM
To: Maven Users List
Subject: Re: Two new questions
 
Hi EJ,

1. Yes - see the reference to settings.xml at
http://maven.apache.org/maven-settings/settings.html - especially about
"<activeProfiles>". You can add your profile there (in settings.xml, under
"<profiles>") and then add this:
<activeProfiles>
  <!-- you can add more than one active-by-default profiles here... -->
  <activeProfile>myProfileName</activeProfile>
</activeProfiles>

2. AFAIK, no.

Hope this helps,
  Arik.

On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
>
> 1 - Is there any way to make a profile stored in profiles.xml the
> default active profile?  I don't see a way to do that unless the profile
> I want is in the pom.xml (I don't want to do this).
>
> 2 - Is there a way from a top level directory to say "compile module-A
> only", or do I have to change directories to module-A and do a mvn
> compile each time?
>
>



Re: Two new questions

Posted by Arik Kfir <ar...@gmail.com>.
Hi EJ,

1. Yes - see the reference to settings.xml at
http://maven.apache.org/maven-settings/settings.html - especially about
"<activeProfiles>". You can add your profile there (in settings.xml, under
"<profiles>") and then add this:
<activeProfiles>
  <!-- you can add more than one active-by-default profiles here... -->
  <activeProfile>myProfileName</activeProfile>
</activeProfiles>

2. AFAIK, no.

Hope this helps,
  Arik.

On 4/14/06, EJ Ciramella <ej...@upromise.com> wrote:
>
> 1 - Is there any way to make a profile stored in profiles.xml the
> default active profile?  I don't see a way to do that unless the profile
> I want is in the pom.xml (I don't want to do this).
>
> 2 - Is there a way from a top level directory to say "compile module-A
> only", or do I have to change directories to module-A and do a mvn
> compile each time?
>
>