You want to use profiles plus filters. This is certainly possible, and
in fact rather simple with Maven2.

Much more information on these topics is available in the Better
Builds With Maven free e-book from www.mergere.com.

Also this blog post should probably be helpful:
http://sujitpal.blogspot.com/2006/10/maven2-multi-environment-filter-setup.html

Wayne

On 2/12/07, moraleslos <[EMAIL PROTECTED]> wrote:

I would like to use maven profiles in the pom but would like someway to
combine this with text substitution.  Basically I would like to have one
generic hibernate configuration file that has a ${connection} ready for
runtime text substitution.  Then I would have 2 external files that contains
the appropriate connection properties, e.g. connection-dev.properties and
connection-prod.properties.  I would like to profile these directly in the
pom, and then invoke maven in the command line specifying the appropriate
profile.  So, for example, when I do this-- mvn -Denv=dev package-- I would
like maven to package my hibernate config file, substituting the
${connection} with that found in connection-dev.properties.  Is there a way
to do this with maven profiles?  Thanks in advance!

-los
--
View this message in context: 
http://www.nabble.com/profiles---text-substitution-tf3217012s177.html#a8934189
Sent from the Maven - Users mailing list archive at Nabble.com.


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



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

Reply via email to