Maven: is it possible to use a conditional properties filtering? -


as know there useful option in maven resource plugin: can use filtering replace placeholders in resources files predefined values. explanation can found here: http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

a question is: possible use conditional filtering? i.e. want replace placeholders in files want basing on conditions, example:

if value of myproperty = "developmentsetup" replacement comes development.properties, otherwise use "productionsetup".

can maven?

while cannot configure maven's resource plugin use conditional filtering (at least far know), still possible maven select build profile based on value of particular property. described on maven - introduction build profiles, can activate particular profile when property has given value (scroll down 'the profile below activate profile when system property "debug" specified value').

so, solution problem set 2 profiles, development , production. in these profiles, configure resource filter settings accordingly either use development property file or production property file.

there useful information in maven: complete reference. tips , tricks section.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -