org.apache.maven.plugin.eclipse.it
Class EclipsePluginMasterProjectIT

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.testing.AbstractMojoTestCase
                  extended by org.apache.maven.plugin.eclipse.it.AbstractEclipsePluginIT
                      extended by org.apache.maven.plugin.eclipse.it.EclipsePluginMasterProjectIT
All Implemented Interfaces:
Test

public class EclipsePluginMasterProjectIT
extends AbstractEclipsePluginIT

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: EclipsePluginMasterProjectIT.java 1190754 2011-10-29 04:26:32Z hboutemy $
Author:
Fabrizio Giustina

Field Summary
protected  File basedir
           
 
Fields inherited from class org.apache.maven.plugin.eclipse.it.AbstractEclipsePluginIT
ARTIFACT_ID, GROUP_ID, localRepositoryDirectory, PomFile, VERSION
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
container
 
Constructor Summary
EclipsePluginMasterProjectIT()
           
 
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.it.AbstractEclipsePluginIT
assertContains, assertDoesNotContain, assertFileEquals, assertNotAvailableMarkerFileDoesNotExist, assertNotAvailableMarkerFileExists, compareDirectoryContent, executeMaven, executeMaven, getNotAvailableMarkerFile, getOutputDirectory, getPluginCLISpecification, getTestWorkspaceWorkDirectory, readProject, tearDown, testProject, testProject, testProject, testProject, testProject, testProject, testWorkspace, testWorkspace, testWorkspace
 
Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setVariableValueToObject
 
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

EclipsePluginMasterProjectIT

public EclipsePluginMasterProjectIT()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class AbstractEclipsePluginIT
Throws:
Exception
See Also:
AbstractEclipsePluginIT.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-2012 The Apache Software Foundation. All Rights Reserved.