maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "EJ Ciramella" <ejcirame...@upromise.com>
Subject RE: Two new questions
Date Fri, 14 Apr 2006 11:43:56 GMT
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:tom.huybrechts@gmail.com] 
Sent: Friday, April 14, 2006 3:51 AM
To: Maven Users List
Subject: Re: Two new questions

On 4/14/06, EJ Ciramella <ejciramella@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

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


Mime
View raw message