mirror of https://github.com/apache/maven.git
Allow to use a role-hint in parameter expression
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293284 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bea5e00e1e
commit
cce67f6caa
|
@ -280,8 +280,19 @@ public class PluginDescriptorGenerator
|
|||
// remove "component." plus expression delimiters
|
||||
String role = expression.substring( "${component.".length(), expression.length() - 1 );
|
||||
|
||||
String roleHint = null;
|
||||
|
||||
int posRoleHintSeparator;
|
||||
|
||||
if ( ( posRoleHintSeparator = role.indexOf( "#" ) ) > 0 )
|
||||
{
|
||||
roleHint = role.substring( posRoleHintSeparator + 1 );
|
||||
|
||||
role = role.substring( 0, posRoleHintSeparator );
|
||||
}
|
||||
|
||||
// TODO: remove deprecated expression
|
||||
requirements.put( parameter.getName(), new Requirement( role ) );
|
||||
requirements.put( parameter.getName(), new Requirement( role, roleHint ) );
|
||||
}
|
||||
else if ( parameter.getRequirement() != null )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue