kaz         2003/01/25 11:13:14

  Modified:    src/java/org/apache/maven/plugin PluginCacheManager.java
  Log:
  Strips whitespace from user supplied prereqs.  This fixes a problem
  where prereqs are defined with spaces in them such as:
  
  prereqs="one, two"
  
  When the prereqs are cached, the space was preserved and this screwed up
  other things.  This fixes my issue with the apt plugin not running.
  
  Revision  Changes    Path
  1.7       +3 -1      
jakarta-turbine-maven/src/java/org/apache/maven/plugin/PluginCacheManager.java
  
  Index: PluginCacheManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/plugin/PluginCacheManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PluginCacheManager.java   22 Jan 2003 06:10:11 -0000      1.6
  +++ PluginCacheManager.java   25 Jan 2003 19:13:14 -0000      1.7
  @@ -66,6 +66,8 @@
   import javax.xml.parsers.SAXParser;
   import javax.xml.parsers.SAXParserFactory;
   
  +import org.apache.commons.lang.StringUtils;
  +
   import org.xml.sax.Attributes;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXParseException;
  @@ -489,7 +491,7 @@
               // Only tack on the descriptions if they are valid.
               if ( prereqs != null )
               {
  -                goalProperty += prereqs;
  +                goalProperty += StringUtils.deleteWhitespace( prereqs );
               }
   
               goalCache.setProperty( name, goalProperty );
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to