[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16771931#comment-16771931 ] Jean-Charles Manoury commented on MSHARED-793: -- I agree to mark this issue as solved, I will close the related pull-request > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > Fix For: waiting-for-feedback > > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16770193#comment-16770193 ] Michael Osipov commented on MSHARED-793: Can we close this since I have provided a reasonable solution for that issue?! > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > Fix For: waiting-for-feedback > > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734247#comment-16734247 ] Robert Scholte commented on MSHARED-793: Right, so none of these files is being used by Maven, but they are generated by Maven to be consumed by Spring. The setup as shown by Michael is exactly what I whould expect: your app.properties will contains {{${toto:tutu\}}} while your app-secrets may or may not contain {{toto=tatu}} I prefer to solve this at Spring Application level and not by changing the property-mechanism of Maven. (maybe we should add an example page to the documentation) > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734231#comment-16734231 ] Michael Osipov commented on MSHARED-793: I have the exact same case at work. I solved it that way: The base application has a {{.properties}} file which can be overridden with {{-custom.properties}} then read by Spring with: {code} http://www.w3.org/2001/XMLSchema-instance; xmlns:beans="http://www.springframework.org/schema/beans; xmlns:context="http://www.springframework.org/schema/context; xmlns:c="http://www.springframework.org/schema/c; xmlns:p="http://www.springframework.org/schema/p; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd;> classpath:com/company/webapp/build.properties classpath:app.properties classpath:app-custom.properties file:${catalina.base}/conf/app-secrets.properties {code} > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734226#comment-16734226 ] Jean-Charles Manoury commented on MSHARED-793: -- Sorry I shouldn't have mentioned Spring compatibility, it's confusing. Here an example : We are using a properties file for each environment of our project (dev, QA, pre-production, etc...) and we setup this .properties file during the build with maven-filters (at the end properties are read by Spring but that's not the point), I would like to avoid empty properties when they are not set specifically for an environment, that's why I would like to have a default value. > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734070#comment-16734070 ] Robert Scholte commented on MSHARED-793: Still, up until now I haven't hit any issue with this, probably because we have the concept of inheritence. Hence show me an example where you need this concept of default value in the expression. > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734065#comment-16734065 ] Michael Osipov commented on MSHARED-793: I think we was solely referring to the default value feature. > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734062#comment-16734062 ] Robert Scholte commented on MSHARED-793: I really wonder if this makes sense. How can a Spring property file (runtime) be interesting for buildtime? Can you provide a full example where you need this feature? > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MSHARED-793) Support for default value
[ https://issues.apache.org/jira/browse/MSHARED-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16734057#comment-16734057 ] Michael Osipov commented on MSHARED-793: The default token must be {{:-}} like people are used in the shell or elsewhere. > Support for default value > - > > Key: MSHARED-793 > URL: https://issues.apache.org/jira/browse/MSHARED-793 > Project: Maven Shared Components > Issue Type: New Feature > Components: maven-filtering >Affects Versions: maven-filtering-3.1.2 >Reporter: Jean-Charles Manoury >Priority: Major > Labels: pull-request-available > > The goal is to manage default value like ${toto:tutu} where tutu is used when > no value for toto is found. > It is the same behavior as Spring's > [PropertyPlaceholderConfigurer|https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-example/] > This will make properties files from a Spring project compatible with > maven-filtering. > A pull request had been created on Github : > https://github.com/apache/maven-filtering/pull/1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)