public void testExplodedWarWithAar()
throws Exception
{
// setup test data
String testId = "ExplodedWarWithAar";
MavenProjectArtifactsStub project = new MavenProjectArtifactsStub();
File webAppDirectory = new File( getTestDirectory(), testId );
File webAppSource = createWebAppSource( testId );
File classesDir = createClassesDir( testId, true );
// Fake here since the aar artifact handler does not exist: no biggie
ArtifactHandler artifactHandler = (ArtifactHandler) lookup( ArtifactHandler.ROLE, "jar" );
ArtifactStub aarArtifact = new AarArtifactStub( getBasedir(), artifactHandler );
File aarFile = aarArtifact.getFile();
assertTrue( "jar not found: " + aarFile.toString(), aarFile.exists() );
// configure mojo
project.addArtifact( aarArtifact );
this.configureMojo( mojo, new LinkedList<String>(), classesDir, webAppSource, webAppDirectory, project );
mojo.execute();
// validate operation
File expectedWebSourceFile = new File( webAppDirectory, "pansit.jsp" );