private Model readModel ( final InputStream pomStream ) throws MojoExecutionException { Reader reader = null ; try { reader = ReaderFactory . newXmlReader ( pomStream ) ; return new MavenXpp3Reader ( ) . read ( reader ) ; } catch ( FileNotFoundException e ) { throw new MojoExecutionException ( "File not found " + pomFile , e ) ; } catch ( IOException e ) { throw new MojoExecutionException ( "Error reading POM " + pomFile , e ) ; } catch ( XmlPullParserException e ) { throw new MojoExecutionException ( "Error parsing POM " + pomFile , e ) ; } finally { IOUtil . close ( reader ) ; } }
Parses a POM .