You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2003/12/10 21:23:28 UTC

cvs commit: maven-components/maven-project/src/test-input/c/cc/ccc project.properties project.xml

jvanzyl     2003/12/10 12:23:28

  Modified:    maven-project/src/test/org/apache/maven/project
                        DefaultProjectBuilderTest.java
  Added:       maven-project/src/test-input/c/cc project.properties
                        project.xml
               maven-project/src/test-input/c/cc/ccc project.properties
                        project.xml
  Log:
  o adding test materials and start of tests for recursive model inheritance
    that incorporates property interpolation.
  
  Revision  Changes    Path
  1.19      +22 -0     maven-components/maven-project/src/test/org/apache/maven/project/DefaultProjectBuilderTest.java
  
  Index: DefaultProjectBuilderTest.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-project/src/test/org/apache/maven/project/DefaultProjectBuilderTest.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DefaultProjectBuilderTest.java	10 Dec 2003 15:53:15 -0000	1.18
  +++ DefaultProjectBuilderTest.java	10 Dec 2003 20:23:28 -0000	1.19
  @@ -115,6 +115,10 @@
           }
       }
   
  +    // ------------------------------------------------------------------------
  +    // Recursive Property Inheritance
  +    // ------------------------------------------------------------------------
  +
       public void testPropertyInheritanceWithASingleLevelOfInheritance()
           throws Exception
       {
  @@ -152,7 +156,9 @@
           assertEquals( "canada", project.getProperty( "country" ) );
       }
   
  +    // ------------------------------------------------------------------------
       // Recursive Model Inheritance
  +    // ------------------------------------------------------------------------
   
       public void testModelInheritanceWithTwoLevelsOfInheritance()
           throws Exception
  @@ -209,5 +215,21 @@
   
           // Get the inception year from the great grand parent.
           assertEquals( "2001", project.getInceptionYear() );
  +    }
  +
  +    // ------------------------------------------------------------------------
  +    // Recursive Model Inheritance with property interpolation
  +    // ------------------------------------------------------------------------
  +
  +    public void testModelInheritanceWithPropertyInterpolationAndThreeLevelsOfInheritance()
  +        throws Exception
  +    {
  +        File f = new File( basedir, "src/test-input/c/cc/ccc/project.xml" );
  +
  +        Project project = projectBuilder.build( f );
  +
  +        assertNotNull( "Test project cannot be null.", project );
  +
  +        assertNotNull( project.getParent().getParent() );
       }
   }
  
  
  
  1.1                  maven-components/maven-project/src/test-input/c/cc/project.properties
  
  Index: project.properties
  ===================================================================
  name = cc
  
  
  
  1.1                  maven-components/maven-project/src/test-input/c/cc/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <extend>${basedir}/../project.xml</extend>
    <groupId>cc</groupId>
    <artifactId>cc</artifactId>
    <name>cc</name>
    <version>2.0</version>
    <url>cc-url</url>
  </project>
  
  
  
  
  1.1                  maven-components/maven-project/src/test-input/c/cc/ccc/project.properties
  
  Index: project.properties
  ===================================================================
  name = ccc
  
  
  
  1.1                  maven-components/maven-project/src/test-input/c/cc/ccc/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <extend>${basedir}/../project.xml</extend>
    <groupId>ccc</groupId>
    <artifactId>ccc</artifactId>
    <name>ccc</name>
    <version>3.0</version>
  </project>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org