org.apache.maven.it
Class MavenITmng2972OverridePluginDependencyTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.maven.it.AbstractMavenIntegrationTestCase
org.apache.maven.it.MavenITmng2972OverridePluginDependencyTest
- All Implemented Interfaces:
- Test
public class MavenITmng2972OverridePluginDependencyTest
- extends AbstractMavenIntegrationTestCase
This is a test set for MNG-2972.
- Version:
- $Id: MavenITmng2972OverridePluginDependencyTest.java 981712 2010-08-03 00:36:19Z bentmann $
- Author:
- Benjamin Bentmann
Method Summary |
void |
testitCommandLineInvocation()
Verify that a project-level plugin dependency replaces the original dependency from the plugin POM. |
void |
testitLifecycleInvocation()
Verify that a project-level plugin dependency replaces the original dependency from the plugin POM. |
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, failNotEquals, failNotSame, failSame, format |
MavenITmng2972OverridePluginDependencyTest
public MavenITmng2972OverridePluginDependencyTest()
testitLifecycleInvocation
public void testitLifecycleInvocation()
throws Exception
- Verify that a project-level plugin dependency replaces the original dependency from the plugin POM.
- Throws:
Exception
testitCommandLineInvocation
public void testitCommandLineInvocation()
throws Exception
- Verify that a project-level plugin dependency replaces the original dependency from the plugin POM.
Apart from testing direct CLI invocation this time, this test also employs a slightly different version for the
overriding dependency. The original bug is caused by usage of a HashSet but whenever the random order of its
elements happens to match the correct ordering, the test cannot detect the bad implementation. The obvious way
to increase the test coverage is re-running the test with different dependency versions, each time producing
another hash code for the dependency artifact and thereby changing its position in the HashSet's element order.
The two versions 0.2-mng-2972 and 9.9-MNG-2972 we use here have at least once proven (on Sun JDK 1.6.0_07) to
successfully break the correctness of the random ordering.
- Throws:
Exception
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.