FileInputStream stream = null;
try
{
stream = new FileInputStream( optionsFile );
JavadocOptions options = new JavadocOptionsXpp3Reader().read( stream );
bundles.add( new JavadocBundle( options, new File( project.getBasedir(), options.getJavadocResourcesDirectory() ) ) );
}
catch ( XmlPullParserException e )
{
IOException error = new IOException( "Failed to read javadoc options from: " + optionsFile + "\nReason: " + e.getMessage() );
error.initCause( e );