org.apache.maven.project.inheritance.t09
Class ProjectInheritanceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.project.AbstractMavenProjectTestCase
                  extended by org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase
                      extended by org.apache.maven.project.inheritance.t09.ProjectInheritanceTest
All Implemented Interfaces:
junit.framework.Test

public class ProjectInheritanceTest
extends AbstractProjectInheritanceTestCase

Verifies exclusions listed in dependencyManagement are valid for transitive dependencies.

Version:
$Id: ProjectInheritanceTest.java 640549 2008-03-24 20:05:11Z bentmann $
Author:
Patrick Schneider

Field Summary
 
Fields inherited from class org.apache.maven.project.AbstractMavenProjectTestCase
projectBuilder
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
ProjectInheritanceTest()
           
 
Method Summary
 void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives()
          Setup exactly the same as the above test, except that the child project now depends upon d, which has a transitive dependency on c.
 void testDependencyManagementExclusionsExcludeTransitively()
          How the test project is set up: 1.
 
Methods inherited from class org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase
getLocalRepositoryPath, getTestSeries, projectFile
 
Methods inherited from class org.apache.maven.project.AbstractMavenProjectTestCase
getFileForClasspathResource, getLocalRepository, getProject, getProjectWithDependencies, setUp
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectInheritanceTest

public ProjectInheritanceTest()
Method Detail

testDependencyManagementExclusionsExcludeTransitively

public void testDependencyManagementExclusionsExcludeTransitively()
                                                           throws Exception
How the test project is set up: 1. dependencyManagement lists dependencies on a & b, with an exclusion on c in b. 2. the child project lists a dependency on project a only 3. a depends on b (which is transitive to the child project), and b depends on c. We should see that the resulting size of collected artifacts is two: a & b only.

Throws:
Exception

testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives

public void testDependencyManagementExclusionDoesNotOverrideGloballyForTransitives()
                                                                            throws Exception
Setup exactly the same as the above test, except that the child project now depends upon d, which has a transitive dependency on c. Even though we did list an exclusion on c, it was only from within the context of project b. We will pick up project c in this case because no restrictions were placed on d. This demonstrates that a, b, c, & d will all be collected.

Throws:
Exception


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.