maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms p0-1.0.pom p1-1.0.pom p2-1.0.pom p3-1.0.pom p4-1.0.pom
Date Thu, 24 Jun 2004 00:35:27 GMT
jvanzyl     2004/06/23 17:35:27

  Added:       maven-core/src/test/java/org/apache/maven/project/inheritance/t01
                        ProjectInheritanceTest.java
               maven-core/src/test/resources/inheritance-repo/t01/maven/poms
                        p0-1.0.pom p1-1.0.pom p2-1.0.pom p3-1.0.pom
                        p4-1.0.pom
  Log:
  o another project inheritance test series
  
  Revision  Changes    Path
  1.1                  maven-components/maven-core/src/test/java/org/apache/maven/project/inheritance/t01/ProjectInheritanceTest.java
  
  Index: ProjectInheritanceTest.java
  ===================================================================
  /*
   * CopyrightPlugin (c) 2004 Your Corporation. All Rights Reserved.
   */
  package org.apache.maven.project.inheritance.t01;
  
  import org.apache.maven.model.MailingList;
  import org.apache.maven.project.MavenProject;
  import org.apache.maven.project.inheritance.ProjectInheritanceTestCase;
  
  /**
   * A test which demonstrates maven's recursive inheritance where
   * we are testing to make sure that elements stated in a model are
   * not clobbered by the same elements elsewhere in the lineage. 
   *
   * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
   * @version $Id: ProjectInheritanceTest.java,v 1.1 2004/06/24 00:35:27 jvanzyl Exp $
   */
  public class ProjectInheritanceTest
      extends ProjectInheritanceTestCase
  {
      // ----------------------------------------------------------------------
      //
      // p4 inherits from p3
      // p3 inherits from p2
      // p2 inherits from p1
      // p1 inherits from p0
      // p0 inhertis from super model
      //
      // or we can show it graphically as:
      //
      // p4 ---> p3 ---> p2 ---> p1 ---> p0 --> super model
      //
      // ----------------------------------------------------------------------
  
      public void testProjectInheritance()
          throws Exception
      {
          // ----------------------------------------------------------------------
          // Check p0 value for org name
          // ----------------------------------------------------------------------
  
          MavenProject p0 = projectBuilder.build( projectFile( "p0" ) );
  
          assertEquals( "p0-org", p0.getOrganization().getName() );
  
          // ----------------------------------------------------------------------
          // Check p1 value for org name
          // ----------------------------------------------------------------------
  
          MavenProject p1 = projectBuilder.build( projectFile( "p1" ) );
  
          assertEquals( "p1-org", p1.getOrganization().getName() );
  
          // ----------------------------------------------------------------------
          // Check p2 value for org name
          // ----------------------------------------------------------------------
  
          MavenProject p2 = projectBuilder.build( projectFile( "p2" ) );
  
          assertEquals( "p2-org", p2.getOrganization().getName() );
  
          // ----------------------------------------------------------------------
          // Check p2 value for org name
          // ----------------------------------------------------------------------
  
          MavenProject p3 = projectBuilder.build( projectFile( "p3" ) );
  
          assertEquals( "p3-org", p3.getOrganization().getName() );
  
          // ----------------------------------------------------------------------
          // Check p4 value for org name
          // ----------------------------------------------------------------------
  
          MavenProject p4 = projectBuilder.build( projectFile( "p4" ) );
  
          assertEquals( "p4-org", p4.getOrganization().getName() );
      }
  }
  
  
  
  1.1                  maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms/p0-1.0.pom
  
  Index: p0-1.0.pom
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <groupId>maven</groupId>
    <artifactId>p0</artifactId>
    <name>p0</name>
    <version>1.0</version>
    <organization>
      <name>p0-org</name>
    </organization>
  </project>
  
  
  
  
  1.1                  maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms/p1-1.0.pom
  
  Index: p1-1.0.pom
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <parent>
      <groupId>maven</groupId>
      <artifactId>p0</artifactId>
      <version>1.0</version>
    </parent>
    <groupId>maven</groupId>
    <artifactId>p1</artifactId>
    <name>p1</name>
    <version>1.0</version>
    <organization>
      <name>p1-org</name>
    </organization>
  </project>
  
  
  
  
  1.1                  maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms/p2-1.0.pom
  
  Index: p2-1.0.pom
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <parent>
      <groupId>maven</groupId>
      <artifactId>p1</artifactId>
      <version>1.0</version>
    </parent>
    <groupId>maven</groupId>
    <artifactId>p2</artifactId>
    <name>p2</name>
    <version>1.0</version>
    <organization>
      <name>p2-org</name>
    </organization>
  </project>
  
  
  
  
  1.1                  maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms/p3-1.0.pom
  
  Index: p3-1.0.pom
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <parent>
      <groupId>maven</groupId>
      <artifactId>p2</artifactId>
      <version>1.0</version>
    </parent>
    <groupId>maven</groupId>
    <artifactId>p3</artifactId>
    <name>p3</name>
    <version>1.0</version>
    <organization>
      <name>p3-org</name>
    </organization>
  </project>
  
  
  
  
  1.1                  maven-components/maven-core/src/test/resources/inheritance-repo/t01/maven/poms/p4-1.0.pom
  
  Index: p4-1.0.pom
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project>
    <parent>
      <groupId>maven</groupId>
      <artifactId>p3</artifactId>
      <version>1.0</version>
    </parent>
    <groupId>maven</groupId>
    <artifactId>p4</artifactId>
    <name>p4</name>
    <version>1.0</version>
    <organization>
      <name>p4-org</name>
    </organization>
  </project>
  
  
  
  

Mime
View raw message