protected ModelProcessor newModelProcessor() { DefaultModelProcessor processor = new DefaultModelProcessor(); processor.setModelLocator( newModelLocator() ); processor.setModelReader( newModelReader() ); return processor; }
private static Model readModel() { DefaultModelProcessor modelProcessor = new DefaultModelProcessor(); modelProcessor.setModelLocator(new DefaultModelLocator()); modelProcessor.setModelReader(new DefaultModelReader()); try { return modelProcessor.read(SpringBootDependenciesDependencyManagement.class .getResourceAsStream("effective-pom.xml"), null); } catch (IOException ex) { throw new IllegalStateException("Failed to build model from effective pom", ex); } }
@Override public Model read(File input, Map<String, ?> options) throws IOException { Model model = super.read(input, options); return process(model); }
@Override public Model read(File input, Map<String, ?> options) throws IOException { final Model projectModel = super.read(input, options); return processModel(projectModel, options); }
protected ModelProcessor newModelProcessor() { DefaultModelProcessor processor = new DefaultModelProcessor(); processor.setModelLocator( newModelLocator() ); processor.setModelReader( newModelReader() ); return processor; }
@Override public Model read(Reader input, Map<String, ?> options) throws IOException { final Model projectModel = super.read(input, options); return processModel(projectModel, options); }
@Override public Model read(Reader input, Map<String, ?> options) throws IOException { Model model = super.read(input, options); return process(model); }
@Override public Model read(InputStream input, Map<String, ?> options) throws IOException { final Model projectModel = super.read(input, options); return processModel(projectModel, options); }
@Override public Model read(InputStream input, Map<String, ?> options) throws IOException { try { Model model = super.read(new BufferedInputStream(input) { @Override public void close() throws IOException { } }, options); return process(model); } finally { input.close(); } }