}
public void testArchiverExceptionInModuleSet()
throws Exception
{
AssemblyMojo mojo = getMojo( "moduleSet-plugin-config.xml" );
MavenProject project = (MavenProject) getVariableValueFromObject( mojo, "executedProject" );
List reactorProjectsList = (List) getVariableValueFromObject( mojo, "reactorProjects" );
for ( Iterator reactorProjects = reactorProjectsList.iterator(); reactorProjects.hasNext(); )
{
MavenProject reactorProject = (MavenProject) reactorProjects.next();
reactorProject.setParent( project );
}
ArchiverManagerStub.archiverStub = new JarArchiverStub()
{
public void addDirectory( File file, String string, String[] includes, String[] excludes )
throws ArchiverException
{
throw new ArchiverException( "Intentional exception" );
}
};
try
{
mojo.execute();
fail( "Expected exception not thrown" );
}
catch ( MojoExecutionException e )
{