I want it defined in profiles.xml and activated in pom.xml (pretend
there's no available setting.xml). 

-----Original Message-----
From: Tom Huybrechts [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 14, 2006 3:51 AM
To: Maven Users List
Subject: Re: Two new questions

On 4/14/06, EJ Ciramella <[EMAIL PROTECTED]> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to