[
https://jira.codehaus.org/browse/MNG-4699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Benedict updated MNG-4699:
-------------------------------
Fix Version/s: (was: Issues to be reviewed for 3.x)
> Properties appending, changing, self-reference, scope and other
> ---------------------------------------------------------------
>
> Key: MNG-4699
> URL: https://jira.codehaus.org/browse/MNG-4699
> Project: Maven
> Issue Type: Improvement
> Affects Versions: 2.2.1
> Environment: Any
> Reporter: Ivan Bondarenko
>
> 1. Currently property mechanism is not very strong in Maven. So I think
> property management should be complemented with such things:
> 1) "overridden-by" option - is a comma-separated list of values ('parent',
> 'children', 'profiles', 'env', 'cli', maybe some other) which specifies which
> properties with the same name can override this one. For example value
> "env,cli,profiles" means property can be overridden by environment variables,
> command line params and by profiles.
> 2) "scope" option (related to "overridden-by") - scope of variable. Values at
> least: 'local' (visible only in current context, e.g. not visible in profiles
> if declared in project), 'global' (visible everywhere), some other scopes).
> 3) "read-only" (true/false) - 'true' means that variable can be changed
> somewhere, possibly !!!self-referenced!!!
> So pom will look like:
> <properties>
> <property>
> <name>_name_</name>
> <value>_value_</value>
> <overridden-by>env,cli,profiles</overridden-by>
> <scope>global</scope><!-- default-->
> <read-only></read-only><!-- default-->
> </property>
> </properties>
> 2. Of course old style of properties can be left (left also), because
> additional options are not extremely important in practice. But what is
> really important here - is ability to append/self-reference properties.
> For example in our current project we have different feature sets,
> unnecessary of which are excluded with the help of profiles, like this:
> <project> <!-- simplified syntax -->
> <properties>
> <ex1></ex1>
> <ex2></ex2>
> ...
> <exN></exN>
> <properties>
> <profile id="p1">
> <properties>
> <ex1>,path1</ex1>
> <properties>
> </profile>
> <profile id="p2">
> <properties>
> <ex2>,path2</ex2>
> <properties>
> </profile>
> ...
> <build>
> <war-plugin>
> <packagingExcludes>${ex1}${ex2}...${exN}</packagingExcludes>
> </war-plugin>
> </build>
> </project>
> It would be much better if only one property is necessary ("ex"), so in each
> profile we can write <ex>${ex},pathI</ex>, so war-plugin configuration will
> not be aware of profiles count.
> If this problem can be solved in some other way (but without antrun-plugin),
> I would be grateful if somebody tell me the solution.
> I apologize if this is duplication or can be solved in another way.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)