{
warOutputStream = new FileOutputStream( tmpWar );
os = new ArchiveStreamFactory().createArchiveOutputStream( ArchiveStreamFactory.JAR, warOutputStream );
os.putArchiveEntry( new JarArchiveEntry( "META-INF/context.xml" ) );
IOUtils.copy( new FileInputStream( contextXmlFile ), os );
os.closeArchiveEntry();
JarFile jarFile = new JarFile( warFile );
Enumeration<JarEntry> jarEntries = jarFile.entries();
while ( jarEntries.hasMoreElements() )
{