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/03/19 22:21:02 UTC

Including dependencies via profile.

Hi folks,

I can't quite figure how this should work.  I have a project in which 
there are 4 or 5 modules subordinate to the master POM, two of which 
have other subordinate modules.  In one case, I need to include a 
subordinate module only when a particular profile is active - it 
provides a dummy security authorization scheme used for demo purposes, 
so I don't want it included in any production build.  I keep seeing that 
all of the profile "stuff" should all be kept in the master POM - 
centralized.  This makes sense to me, but I fail to see how that's going 
to work in my case.  If I add the profile to my master POM to include a 
specific module, won't that get translated into every subordinate POM?

My guess would be that I should only add this to the POM of which that 
module is a part, but doesn't that then decentralize the profile 
information?  Or, is there some way to define the profile in the master 
but have it only effective in a particular sub-module?

Thanks in advance,
David


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


RE: Including dependencies via profile.

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Profiles themselves are not inherited, just the results of any changes
they make are inherited.

-----Original Message-----
From: David C. Hicks [mailto:dhicks@i-hicks.org] 
Sent: Wednesday, March 19, 2008 5:21 PM
To: Maven Users
Subject: Including dependencies via profile.

Hi folks,

I can't quite figure how this should work.  I have a project in which 
there are 4 or 5 modules subordinate to the master POM, two of which 
have other subordinate modules.  In one case, I need to include a 
subordinate module only when a particular profile is active - it 
provides a dummy security authorization scheme used for demo purposes, 
so I don't want it included in any production build.  I keep seeing that

all of the profile "stuff" should all be kept in the master POM - 
centralized.  This makes sense to me, but I fail to see how that's going

to work in my case.  If I add the profile to my master POM to include a 
specific module, won't that get translated into every subordinate POM?

My guess would be that I should only add this to the POM of which that 
module is a part, but doesn't that then decentralize the profile 
information?  Or, is there some way to define the profile in the master 
but have it only effective in a particular sub-module?

Thanks in advance,
David


---------------------------------------------------------------------
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