jvanzyl     2003/06/06 18:27:53

  Modified:    .        project.xml
               src/conf driver.properties
               src/java/org/apache/maven MavenConstants.java
                        MavenUtils.java
               src/test/touchstone-build maven.xml
               src/test/touchstone-build/src/reactor-build/standard
                        project.properties
  Added:       src/conf defaults.properties
  Log:
  o MAVEN-294
  
    Applying John Casey's patches for dealing with property values that are
    present in driver.properties that need to be overriden.
  
  Revision  Changes    Path
  1.276     +1 -2      maven/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/project.xml,v
  retrieving revision 1.275
  retrieving revision 1.276
  diff -u -r1.275 -r1.276
  --- project.xml       28 May 2003 23:13:44 -0000      1.275
  +++ project.xml       7 Jun 2003 01:27:52 -0000       1.276
  @@ -525,9 +525,8 @@
             <include>*.xsd</include>
             <include>*.dtd</include>
             <include>*.mod</include>
  -          <include>log4j.properties</include>
  +          <include>*.properties</include>
             <include>driver.jelly</include>
  -          <include>driver.properties</include>
           </includes>
         </resource>
         <resource>
  
  
  
  1.7       +0 -48     maven/src/conf/driver.properties
  
  Index: driver.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/conf/driver.properties,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- driver.properties 4 May 2003 23:44:31 -0000       1.6
  +++ driver.properties 7 Jun 2003 01:27:52 -0000       1.7
  @@ -2,60 +2,12 @@
   # D R I V E R  P R O P E R T I E S
   # -------------------------------------------------------------------
   
  -maven.home.local = ${user.home}/.maven
  -
  -maven.src.dir = ${basedir}/src
  -maven.conf.dir = ${basedir}/conf
  -maven.build.dir = ${basedir}/target
  -maven.build.src = ${maven.build.dir}/src
  -maven.build.dest = ${maven.build.dir}/classes
  -
  -maven.compile.debug = on
  -maven.compile.optimize = off
  -maven.compile.deprecation = off
  -
  -maven.jar.excludes = **/package.html
  -
   maven.final.name = ${pom.artifactId}-${pom.currentVersion}
   maven.final.dir = ${basedir}/${maven.final.name}
   
   
   # -------------------------------------------------------------------
  -# M A V E N  L O C A L  R E P O
  -# -------------------------------------------------------------------
  -maven.repo.local = ${maven.home.local}/repository
  -
  -# -------------------------------------------------------------------
  -# M A V E N  P L U G - I N  D I R E C T O R Y
  -# -------------------------------------------------------------------
  -maven.plugin.dir = ${maven.home}/plugins
  -maven.plugin.unpacked.dir = ${maven.home.local}/plugins
  -
  -# -------------------------------------------------------------------
  -# M A V E N  R E M O T E  R E P O S
  -# -------------------------------------------------------------------
  -maven.repo.remote = http://www.ibiblio.org/maven
  -maven.repo.central = login.ibiblio.org
  -maven.repo.central.directory = /public/html/maven
  -maven.repo.remote.enabled = true
  -
  -# -------------------------------------------------------------------
  -# M A V E N  D I S T R I B U T I O N S
  -# -------------------------------------------------------------------
  -maven.distBuildDirectory = ${basedir}/target
  -maven.distBuildIndicator = DIST_BUILD_DIRECTORY
  -maven.distDirectory = ${basedir}/dist
  -
  -# -------------------------------------------------------------------
  -# E N V I R O N M E N T  D E P E N D E N T  T O O L S
  -# -------------------------------------------------------------------
  -maven.scp.executable = scp
  -maven.ssh.executable = ssh
  -
  -# -------------------------------------------------------------------
   # Mark the defaults as loaded - PLEASE DON'T OVERRIDE
   # -------------------------------------------------------------------
   maven.defaults.loaded = true
   
  -maven.build = MAVEN_BUILD_NOT_SET
  -maven.username = USERNAME_NOT_SET
  
  
  
  1.1                  maven/src/conf/defaults.properties
  
  Index: defaults.properties
  ===================================================================
  # -------------------------------------------------------------------
  # D R I V E R  P R O P E R T I E S
  # -------------------------------------------------------------------
  
  maven.home.local = ${user.home}/.maven
  
  maven.src.dir = ${basedir}/src
  maven.conf.dir = ${basedir}/conf
  maven.build.dir = ${basedir}/target
  maven.build.src = ${maven.build.dir}/src
  maven.build.dest = ${maven.build.dir}/classes
  
  maven.compile.debug = on
  maven.compile.optimize = off
  maven.compile.deprecation = off
  
  maven.jar.excludes = **/package.html
  
  # -------------------------------------------------------------------
  # M A V E N  L O C A L  R E P O 
  # -------------------------------------------------------------------
  
  maven.repo.local = ${maven.home.local}/repository
  
  # -------------------------------------------------------------------
  # M A V E N  P L U G - I N  D I R E C T O R Y
  # -------------------------------------------------------------------
  maven.plugin.dir = ${maven.home}/plugins
  maven.plugin.unpacked.dir = ${maven.home.local}/plugins
  
  # -------------------------------------------------------------------
  # M A V E N  R E M O T E  R E P O S
  # -------------------------------------------------------------------
  
  maven.repo.remote = http://www.ibiblio.org/maven
  maven.repo.central = login.ibiblio.org
  maven.repo.central.directory = /public/html/maven
  maven.repo.remote.enabled = true
  
  # -------------------------------------------------------------------
  # M A V E N  D I S T R I B U T I O N S
  # -------------------------------------------------------------------
  maven.distBuildDirectory = ${basedir}/target
  maven.distBuildIndicator = DIST_BUILD_DIRECTORY
  maven.distDirectory = ${basedir}/dist
  
  # -------------------------------------------------------------------
  # E N V I R O N M E N T  D E P E N D E N T  T O O L S
  # -------------------------------------------------------------------
  maven.scp.executable = scp
  maven.ssh.executable = ssh
  
  maven.build = MAVEN_BUILD_NOT_SET
  maven.username=USERNAME_NOT_SET
  
  
  
  1.27      +4 -1      maven/src/java/org/apache/maven/MavenConstants.java
  
  Index: MavenConstants.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenConstants.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- MavenConstants.java       4 May 2003 23:39:03 -0000       1.26
  +++ MavenConstants.java       7 Jun 2003 01:27:52 -0000       1.27
  @@ -120,6 +120,9 @@
       /**  Project build file name. (maven.xml) */
       public static final String BUILD_FILE_NAME = "maven.xml";
   
  +    /** Defaults properties */
  +    public static final String DEFAULTS_PROPERTIES = "defaults.properties";
  +
       // Context tags.
   
       /** MavenSession home context tag **/
  
  
  
  1.94      +19 -2     maven/src/java/org/apache/maven/MavenUtils.java
  
  Index: MavenUtils.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenUtils.java,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- MavenUtils.java   12 Apr 2003 00:02:04 -0000      1.93
  +++ MavenUtils.java   7 Jun 2003 01:27:52 -0000       1.94
  @@ -779,6 +779,10 @@
               MavenUtils.class.getClassLoader().getResourceAsStream(
                   MavenConstants.DRIVER_PROPERTIES ) );
   
  +        Properties defaultProperties = loadProperties(
  +            MavenUtils.class.getClassLoader().getResourceAsStream(
  +                MavenConstants.DEFAULTS_PROPERTIES ) );
  +
           Map result = MavenUtils.mergeMaps( new Map[]
           {
               systemProperties,
  @@ -800,16 +804,29 @@
           {
               context = new MavenJellyContext( parentContext );
               context.setInherit( false );
  +            
  +            MavenUtils.integrateMapInContext( result, context );
  +            
  +            // Turn inheritance back on to make the parent's values visible.
  +            context.setInherit( true );
  +            
  +            //add in the driver.properties with defaults, but in inheritance mode.
  +            MavenUtils.integrateMapInContext( defaultProperties, context );
           }
           else
           {
               context = new MavenJellyContext();
  -        }
   
  +            //integrate everything else...
           MavenUtils.integrateMapInContext( result, context );
   
  +            //integrate defaults...
  +            MavenUtils.integrateMapInContext( defaultProperties, context );
  +            
           // Turn inheritance back on to make the parent's values visible.
           context.setInherit( true );
  +        }
  +
   
           // Set the basedir value in the context.
           context.setVariable( "basedir", descriptorDirectory.getPath() );
  
  
  
  1.34      +3 -5      maven/src/test/touchstone-build/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/test/touchstone-build/maven.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- maven.xml 22 Apr 2003 11:48:50 -0000      1.33
  +++ maven.xml 7 Jun 2003 01:27:53 -0000       1.34
  @@ -52,8 +52,6 @@
   
     <goal name="touchstone-tests">
   
  -    <attainGoal name="test-reactor-maven-username"/>
  -
       <attainGoal name="touchstone-goal-A"/>
       <j:set var="checkValue" 
value="${pom.getPluginContext('maven-touchstone-plugin').getVariable('touchstone_goal_A_from_plugin')}"/>
       <j:if test="${checkValue == 'true'}">
  @@ -188,8 +186,8 @@
              but was set to '${test-mavenjellyscope}'.
          </fail>    
       </j:if>
  -    
  -<!--    <attainGoal name="site"/> -->
  +
  +    <attainGoal name="test-reactor-maven-username"/>
   
     </goal>
   
  @@ -207,7 +205,7 @@
     <goal name="test-reactor-maven-username">
       <maven:reactor
         basedir="${basedir}"
  -      includes="src/username_test/project.xml"
  +      includes="src/reactor-build/username_test/project.xml"
         goals="run"
         banner="Testing"
         ignoreFailures="false"
  
  
  
  1.3       +1 -0      
maven/src/test/touchstone-build/src/reactor-build/standard/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: 
/home/cvs/maven/src/test/touchstone-build/src/reactor-build/standard/project.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.properties        22 Jan 2003 06:50:22 -0000      1.2
  +++ project.properties        7 Jun 2003 01:27:53 -0000       1.3
  @@ -1,3 +1,4 @@
   property.to.share = property_to_share
  +maven.jar.override = true
   maven.jar.myjar = 1.2
   maven.jar.junit = 3.8.1
  
  
  

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

Reply via email to