MPLUGIN-64: Beanshell extractor does not handle parameter default value
Submitted by: Heinrich Nirschl Reviewed by: Vincent Siveton o patch applied git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@613487 13f79535-47bb-0310-9956-ffa450edef68master
parent
214eb5c9cd
commit
510eadd9a3
|
|
@ -14,6 +14,7 @@ this.tagsPattern = Pattern.compile( "(?s)" + tag + "\\s*(.*?)" + tagOrEndComment
|
||||||
this.descriptionPattern = Pattern.compile( "(?s)\\r?\\n\\s*\\*" );
|
this.descriptionPattern = Pattern.compile( "(?s)\\r?\\n\\s*\\*" );
|
||||||
this.typePattern = Pattern.compile( "type\\s*=\\s*\"(.*?)\"" );
|
this.typePattern = Pattern.compile( "type\\s*=\\s*\"(.*?)\"" );
|
||||||
this.expressionPattern = Pattern.compile( "expression\\s*=\\s*\"(.*?)\"" );
|
this.expressionPattern = Pattern.compile( "expression\\s*=\\s*\"(.*?)\"" );
|
||||||
|
this.defaultValuePattern = Pattern.compile( "default-value\\s*=\\s*\"(.*?)\"" );
|
||||||
this.phasePattern = Pattern.compile( "phase\\s*=\\s*\"(.*?)\"" );
|
this.phasePattern = Pattern.compile( "phase\\s*=\\s*\"(.*?)\"" );
|
||||||
this.goalPattern = Pattern.compile( "goal\\s*=\\s*\"(.*?)\"" );
|
this.goalPattern = Pattern.compile( "goal\\s*=\\s*\"(.*?)\"" );
|
||||||
this.lifecyclePattern = Pattern.compile( "lifecycle\\s*=\\s*\"(.*?)\"" );
|
this.lifecyclePattern = Pattern.compile( "lifecycle\\s*=\\s*\"(.*?)\"" );
|
||||||
|
|
@ -62,6 +63,11 @@ createParameter( text, method )
|
||||||
{
|
{
|
||||||
parameter.setExpression( m.group( 1 ) );
|
parameter.setExpression( m.group( 1 ) );
|
||||||
}
|
}
|
||||||
|
m = defaultValuePattern.matcher( value );
|
||||||
|
if ( m.find() )
|
||||||
|
{
|
||||||
|
parameter.setDefaultValue( m.group( 1 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
value = tags.get( "component" );
|
value = tags.get( "component" );
|
||||||
if ( value != null )
|
if ( value != null )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue