Author: vsiveton
Date: Sat Jan 19 16:55:04 2008
New Revision: 613487

URL: http://svn.apache.org/viewvc?rev=613487&view=rev
Log:
MPLUGIN-64: Beanshell extractor does not handle parameter default value
Submitted by: Heinrich Nirschl
Reviewed by: Vincent Siveton

o patch applied

Modified:
    
maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh

Modified: 
maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh?rev=613487&r1=613486&r2=613487&view=diff
==============================================================================
--- 
maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh
 (original)
+++ 
maven/plugin-tools/trunk/maven-plugin-tools-beanshell/src/main/resources/extractor.bsh
 Sat Jan 19 16:55:04 2008
@@ -14,6 +14,7 @@
 this.descriptionPattern = Pattern.compile( "(?s)\\r?\\n\\s*\\*" );
 this.typePattern = Pattern.compile( "type\\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.goalPattern = Pattern.compile( "goal\\s*=\\s*\"(.*?)\"" );
 this.lifecyclePattern = Pattern.compile( "lifecycle\\s*=\\s*\"(.*?)\"" );
@@ -61,6 +62,11 @@
             if ( m.find() )
             {
                 parameter.setExpression( m.group( 1 ) );
+            }
+            m = defaultValuePattern.matcher( value );
+            if ( m.find() )
+            {
+                parameter.setDefaultValue( m.group( 1 ) );
             }
         }
         value = tags.get( "component" );


Reply via email to