This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Activating 2 profiles in Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Activating 2 profiles in Maven" Watch "Activating 2 profiles in Maven" New topic
Author

Activating 2 profiles in Maven

Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
hi guys..

I am using profiles in pom.xml to connect to different databases by supplying values via properites files. So, If I activate 2 profiles at a time using <activateByDefault>true</activateByDefault>
then my application connects to which database. Please clarify my doubt.


Thanks in advance.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Property values are immutable, therefore the first property value that gets set wins. This will be the value set in the first profile in the pom.xml.


JBoss In Action
Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
thank you very much for your peter..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Activating 2 profiles in Maven