/** * Method interpolatedTrimmed. * * @param value * @param context * @return String */ private String interpolatedTrimmed( String value, String context ) { return getTrimmedValue( contentTransformer.transform( value, context ) ); } //-- String interpolatedTrimmed( String, String )
/** * Method interpolatedTrimmed. * * @param value * @param context * @return String */ private String interpolatedTrimmed( String value, String context ) { return getTrimmedValue( contentTransformer.transform( value, context ) ); } //-- String interpolatedTrimmed( String, String )
public void initialize() { modelReader = new MavenXpp3Reader(); }
Model model = null; FileReader reader = null; MavenXpp3Reader mavenreader = new MavenXpp3Reader(); try { reader = new FileReader(pomfile); model = mavenreader.read(reader); model.setPomFile(pomfile); }catch(Exception ex){} MavenProject project = new MavenProject(model);
@Override public void write( Writer output, Map<String, Object> options, Model model ) throws IOException { Objects.requireNonNull( output, "output cannot be null" ); Objects.requireNonNull( model, "model cannot be null" ); try ( final Writer out = output ) { new MavenXpp3Writer().write( out, model ); } }
private Model read( Reader reader, boolean strict, InputSource source ) throws IOException { try { if ( source != null ) { return new MavenXpp3ReaderEx().read( reader, strict, source ); } else { return new MavenXpp3Reader().read( reader, strict ); } } catch ( XmlPullParserException e ) { throw new ModelParseException( e.getMessage(), e.getLineNumber(), e.getColumnNumber(), e ); } }
/** * @see ReaderFactory#newXmlReader * * @param reader * @throws IOException * @throws XmlPullParserException * @return Model */ public Model read( Reader reader ) throws IOException, XmlPullParserException { return read( reader, true ); } //-- Model read( Reader )
/** * Method getBooleanValue. * * @param s * @param parser * @param attribute * @throws XmlPullParserException * @return boolean */ private boolean getBooleanValue( String s, String attribute, XmlPullParser parser ) throws XmlPullParserException { return getBooleanValue( s, attribute, parser, null ); } //-- boolean getBooleanValue( String, String, XmlPullParser )
/** * Method read. * * @param in * @param source * @param strict * @throws IOException * @throws XmlPullParserException * @return Model */ public Model read( InputStream in, boolean strict, InputSource source ) throws IOException, XmlPullParserException { return read( ReaderFactory.newXmlReader( in ), strict, source ); } //-- Model read( InputStream, boolean, InputSource )
/** * Method getDateValue. * * @param s * @param parser * @param attribute * @throws XmlPullParserException * @return Date */ private java.util.Date getDateValue( String s, String attribute, XmlPullParser parser ) throws XmlPullParserException { return getDateValue( s, attribute, null, parser ); } //-- java.util.Date getDateValue( String, String, XmlPullParser )
/** * Method getBooleanValue. * * @param s * @param parser * @param attribute * @throws XmlPullParserException * @return boolean */ private boolean getBooleanValue( String s, String attribute, XmlPullParser parser ) throws XmlPullParserException { return getBooleanValue( s, attribute, parser, null ); } //-- boolean getBooleanValue( String, String, XmlPullParser )
/** * Method getDateValue. * * @param s * @param parser * @param attribute * @throws XmlPullParserException * @return Date */ private java.util.Date getDateValue( String s, String attribute, XmlPullParser parser ) throws XmlPullParserException { return getDateValue( s, attribute, null, parser ); } //-- java.util.Date getDateValue( String, String, XmlPullParser )
/** * Constructs a new helper objects and initializes itself. */ public BundleTestInfo() { try (final FileReader reader = new FileReader("pom.xml")) { // get a raw POM view, not a fully realized POM object. final Model model = new MavenXpp3Reader().read(reader); this.project = new MavenProject(model); } catch (final IOException | XmlPullParserException e) { throw new IllegalStateException("Could not read pom.xml", e); } }
public void writeModel( Writer writer ) throws IOException { MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( writer, getModel() ); }
/** * Method read. * * @param in * @throws IOException * @throws XmlPullParserException * @return Model */ public Model read( InputStream in ) throws IOException, XmlPullParserException { return read( ReaderFactory.newXmlReader( in ) ); } //-- Model read( InputStream )
public void writeOriginalModel( Writer writer ) throws IOException { MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( writer, getOriginalModel() ); }
/** * Method read. * * @param in * @param strict * @throws IOException * @throws XmlPullParserException * @return Model */ public Model read( InputStream in, boolean strict ) throws IOException, XmlPullParserException { return read( ReaderFactory.newXmlReader( in ), strict ); } //-- Model read( InputStream, boolean )
/** * @deprecated Use {@link org.apache.maven.model.io.ModelWriter}. */ @Deprecated public void writeOriginalModel( Writer writer ) throws IOException { MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( writer, getOriginalModel() ); }
/** * @see ReaderFactory#newXmlReader * * @param reader * @param strict * @throws IOException * @throws XmlPullParserException * @return Model */ public Model read( Reader reader, boolean strict ) throws IOException, XmlPullParserException { XmlPullParser parser = addDefaultEntities ? new MXParser(EntityReplacementMap.defaultEntityReplacementMap) : new MXParser( ); parser.setInput( reader ); return read( parser, strict ); } //-- Model read( Reader, boolean )
/** * @deprecated Use {@link org.apache.maven.model.io.ModelWriter}. */ @Deprecated public void writeModel( Writer writer ) throws IOException { MavenXpp3Writer pomWriter = new MavenXpp3Writer(); pomWriter.write( writer, getModel() ); }