org.apache.maven.plugin.eclipse
Class EclipsePluginMasterProjectTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.plugin.eclipse.AbstractEclipsePluginTestCase
                  extended by org.apache.maven.plugin.eclipse.EclipsePluginMasterProjectTest
All Implemented Interfaces:
Test

public class EclipsePluginMasterProjectTest
extends AbstractEclipsePluginTestCase

Master test for eclipse .classpath and .wtpmodules generation.

This test use a 2 modules project with all the mvn dependencies flavours (direct, transitive, with compile/test/provided/system scope, required and optional, artifacts and modules).

In order to fully test the eclipse plugin execution in a such complex environment mvn is executed from a command line. Mvn is started using a custom settings.xml file, created on the fly. The custom settings.xml only adds a mirror for the central repository which is actually a local (file://) repository for loading files from src/test/m2repo

The following is the base layout of modules/dependencies. The actual test is to check generated files for module-2

 
            +----------------+       +-----------------+       +-----------------+
           /| module 1 (jar) | ----> |   refproject    | ----> | deps-refproject |
          / +----------------+       +-----------------+       +-----------------+  
         /           ˆ
    root             | (depends on)
         \           |
          \ +----------------+       +-----------------+       +-----------------+
           \| module 2 (war) | ----> |     direct      | ----> |   deps-direct   |
            +----------------+       +-----------------+       +-----------------+   
 
 

Version:
$Id: EclipsePluginMasterProjectTest.java 595476 2007-11-15 22:21:55Z aheritier $
Author:
Fabrizio Giustina

Field Summary
protected  File basedir
           
 
Fields inherited from class org.apache.maven.plugin.eclipse.AbstractEclipsePluginTestCase
ARTIFACT_ID, GROUP_ID, localRepositoryDirectory, PomFile, VERSION
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
container
 
Constructor Summary
EclipsePluginMasterProjectTest()
           
 
Method Summary
protected  void executeMaven2()
           
protected  void setUp()
           
 void testModule1Classpath()
           
 void testModule1Project()
           
 void testModule1Wtpmodules()
           
 void testModule2Classpath()
           
 void testModule2Project()
           
 void testModule2Wtpmodules()
           
 
Methods inherited from class org.apache.maven.plugin.eclipse.AbstractEclipsePluginTestCase
assertContains, assertDoesNotContain, assertFileEquals, compareDirectoryContent, executeMaven, executeMaven, getOutputDirectory, getPluginCLISpecification, getTestWorkspaceWorkDirectory, readProject, tearDown, testProject, testProject, testProject, testWorkspace, testWorkspace, testWorkspace
 
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
 
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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

basedir

protected File basedir
Constructor Detail

EclipsePluginMasterProjectTest

public EclipsePluginMasterProjectTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AbstractEclipsePluginTestCase
Throws:
Exception
See Also:
AbstractEclipsePluginTestCase.setUp()

executeMaven2

protected void executeMaven2()
                      throws Exception
Throws:
Exception

testModule1Project

public void testModule1Project()
                        throws Exception
Throws:
Exception

testModule1Classpath

public void testModule1Classpath()
                          throws Exception
Throws:
Exception

testModule1Wtpmodules

public void testModule1Wtpmodules()
                           throws Exception
Throws:
Exception

testModule2Project

public void testModule2Project()
                        throws Exception
Throws:
Exception

testModule2Classpath

public void testModule2Classpath()
                          throws Exception
Throws:
Exception

testModule2Wtpmodules

public void testModule2Wtpmodules()
                           throws Exception
Throws:
Exception


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.