public void testExplodedWar_WithWarDependencyIncludeExclude()
throws Exception
{
// setup test data
String testId = "ExplodedWar_WithWarDependencyIncludeExclude";
MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
IncludeExcludeWarArtifactStub includeexcludeWarArtifact = new IncludeExcludeWarArtifactStub( getBasedir() );
File webAppDirectory = new File( getTestDirectory(), testId );
File webAppSource = createWebAppSource( testId );
File classesDir = createClassesDir( testId, true );
File workDirectory = new File( getTestDirectory(), "/war/work-" + testId );
File includeExcludeWarFile = includeexcludeWarArtifact.getFile();
assertTrue( "war not found: " + includeExcludeWarFile.toString(), includeExcludeWarFile.exists() );
createDir( workDirectory );
// configure mojo
project.addArtifact( includeexcludeWarArtifact );
this.configureMojo( mojo, new LinkedList(), classesDir, webAppSource, webAppDirectory, project );
setVariableValueToObject( mojo, "dependentWarIncludes", "**/*Include.jsp,**/*.xml" );
setVariableValueToObject( mojo, "dependentWarExcludes", "**/*Exclude*,**/MANIFEST.MF" );
setVariableValueToObject( mojo, "workDirectory", workDirectory );
mojo.execute();