jvanzyl     02/04/18 19:31:30

  Modified:    src/java/org/apache/maven ProjectProperties.java
  Log:
  Follow ant's standard behaviour where if a property is set it cannot
  be overriden. This is the behaviour ant users expect and I don't want
  to change that.
  
  This change allows people to override values in the POM if they wish which
  is how I came across the problem. I gave turbine-2 a new id = turbine2 so
  that it could be distinguished from turbine-3 (id = turbine3) but I want
  the JAR produced to still be turbine-{version}.jar so I overrode the
  id value in project properties and the ProjectProperties executor was
  clobbering it.
  
  Revision  Changes    Path
  1.26      +2 -2      
jakarta-turbine-maven/src/java/org/apache/maven/ProjectProperties.java
  
  Index: ProjectProperties.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/ProjectProperties.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ProjectProperties.java    19 Apr 2002 01:54:08 -0000      1.25
  +++ ProjectProperties.java    19 Apr 2002 02:31:30 -0000      1.26
  @@ -79,7 +79,7 @@
    * paths required to build the project.
    *
    * @author <a href="[EMAIL PROTECTED]">Jason van Zyl</a>
  - * @version $Id: ProjectProperties.java,v 1.25 2002/04/19 01:54:08 jvanzyl Exp $
  + * @version $Id: ProjectProperties.java,v 1.26 2002/04/19 02:31:30 jvanzyl Exp $
    */
   public class ProjectProperties
       extends ProjectExecutor
  @@ -193,7 +193,7 @@
           {
               String value = (String) values.get(key);
               
  -            if (value.length() > 0)
  +            if (value.length() > 0 && getProject().getProperty(key) == null)
               {
                   getProject().setProperty(key, (String)values.get(key));
               }                
  
  
  


Reply via email to