ZipInputStream zis = new ZipInputStream( jarInputStream );
ZipEntry entry;
while ( ( entry = zis.getNextEntry() ) != null ) {
if ( entry.getName().startsWith( "META-INF/maven" ) && entry.getName().endsWith( "pom.xml" ) ) {
return new ReaderInputStream( new InputStreamReader( zis,
"UTF-8" ) );
}
}
throw new FileNotFoundException( "Could not find pom.xml from the jar." );