public static Document getPluginConfiguration ( ) { try ( final InputStream in = Plugins . class . getClassLoader ( ) . getResourceAsStream ( PLUGIN_CONF ) ) { return DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . parse ( in ) ; } catch ( final ParserConfigurationException | SAXException | IOException e ) { throw new RuntimeException ( "Failed to read plugin configuration: " + e . getMessage ( ) , e ) ; } }
Read plugin configuration