You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "David C. Hicks" <dh...@i-hicks.org> on 2008/02/14 20:07:54 UTC

Controlling the build with profiles.

I'm sure there's a good resource for this on the web somewhere, and I'm 
just not finding it.  I'd like to control certain aspect of my build 
using profiles.  I'd like to prevent certain artifacts from even being 
built unless I ask for them specifically.  For instance, I don't really 
need to build a war file if I just want to build the code and create the 
jars (install).  It would be nice to have it skip that artifact entirely.

Any help?

Thanks!
Dave


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


Re: Controlling the build with profiles.

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Figured it out.  I didn't realize that <modules> are additive.  Once 
that dawned on me, it was easy.
Thanks!

David C. Hicks wrote:
> Yes!  That's exactly what I'm looking for, but I haven't found any 
> examples.  So far, my attempts to do it on my own have met with 
> failure.  I'm not as POM savvy as I'd like to be.  :-(
>
>
> John Casey wrote:
>> Typically, the war file is a separate project from the jar project, 
>> then the war depends on (and subsequently, includes in WEB-INF/lib) 
>> the jar. If you have a structure like this with a common parent pom, 
>> you can shove the <module>war</module> reference into a profile, then 
>> use something like:
>>
>> mvn -P include-war clean install
>>
>> to build with the war, or just:
>>
>> mvn clean install
>>
>> to exclude it.
>>
>> Does that make sense?
>>
>> -john
>>
>> On Feb 14, 2008, at 2:07 PM, David C. Hicks wrote:
>>
>>> I'm sure there's a good resource for this on the web somewhere, and 
>>> I'm just not finding it.  I'd like to control certain aspect of my 
>>> build using profiles.  I'd like to prevent certain artifacts from 
>>> even being built unless I ask for them specifically.  For instance, 
>>> I don't really need to build a war file if I just want to build the 
>>> code and create the jars (install).  It would be nice to have it 
>>> skip that artifact entirely.
>>>
>>> Any help?
>>>
>>> Thanks!
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>> ---
>> John Casey
>> Committer and PMC Member, Apache Maven
>> mail: jdcasey at commonjava dot org
>> blog: http://www.ejlife.net/blogs/john
>> rss: http://feeds.feedburner.com/ejlife/john
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Controlling the build with profiles.

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Yes!  That's exactly what I'm looking for, but I haven't found any 
examples.  So far, my attempts to do it on my own have met with 
failure.  I'm not as POM savvy as I'd like to be.  :-(


John Casey wrote:
> Typically, the war file is a separate project from the jar project, 
> then the war depends on (and subsequently, includes in WEB-INF/lib) 
> the jar. If you have a structure like this with a common parent pom, 
> you can shove the <module>war</module> reference into a profile, then 
> use something like:
>
> mvn -P include-war clean install
>
> to build with the war, or just:
>
> mvn clean install
>
> to exclude it.
>
> Does that make sense?
>
> -john
>
> On Feb 14, 2008, at 2:07 PM, David C. Hicks wrote:
>
>> I'm sure there's a good resource for this on the web somewhere, and 
>> I'm just not finding it.  I'd like to control certain aspect of my 
>> build using profiles.  I'd like to prevent certain artifacts from 
>> even being built unless I ask for them specifically.  For instance, I 
>> don't really need to build a war file if I just want to build the 
>> code and create the jars (install).  It would be nice to have it skip 
>> that artifact entirely.
>>
>> Any help?
>>
>> Thanks!
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> ---
> John Casey
> Committer and PMC Member, Apache Maven
> mail: jdcasey at commonjava dot org
> blog: http://www.ejlife.net/blogs/john
> rss: http://feeds.feedburner.com/ejlife/john
>
>
>

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


Re: Controlling the build with profiles.

Posted by John Casey <jd...@commonjava.org>.
Typically, the war file is a separate project from the jar project,  
then the war depends on (and subsequently, includes in WEB-INF/lib)  
the jar. If you have a structure like this with a common parent pom,  
you can shove the <module>war</module> reference into a profile, then  
use something like:

mvn -P include-war clean install

to build with the war, or just:

mvn clean install

to exclude it.

Does that make sense?

-john

On Feb 14, 2008, at 2:07 PM, David C. Hicks wrote:

> I'm sure there's a good resource for this on the web somewhere, and  
> I'm just not finding it.  I'd like to control certain aspect of my  
> build using profiles.  I'd like to prevent certain artifacts from  
> even being built unless I ask for them specifically.  For instance,  
> I don't really need to build a war file if I just want to build the  
> code and create the jars (install).  It would be nice to have it  
> skip that artifact entirely.
>
> Any help?
>
> Thanks!
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---
John Casey
Committer and PMC Member, Apache Maven
mail: jdcasey at commonjava dot org
blog: http://www.ejlife.net/blogs/john
rss: http://feeds.feedburner.com/ejlife/john