Class LocationAwareMavenReader

java.lang.Object
org.technologybrewery.baton.util.pom.LocationAwareMavenReader

public final class LocationAwareMavenReader extends Object
This class is nearly an exact copy of MavenXpp3ReaderEx (which tracks the location of model elements in the original source POM). It extends the location tracking to attach the start and end character of the entire block of XML for each element. This is useful for editing the file in place and preserving the original formatting. In order to fully support this, some elements which previously did not have location tracking have been updated to include it.
  • Field Details

  • Constructor Details

  • Method Details

    • getAddDefaultEntities

      public boolean getAddDefaultEntities()
      Returns the state of the "add default entities" flag.
      Returns:
      boolean
    • read

      public org.apache.maven.model.Model read(Reader reader, boolean strict, org.apache.maven.model.InputSource source) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Parameters:
      reader -
      source -
      strict -
      Returns:
      Model
      Throws:
      IOException
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
      See Also:
      • ReaderFactory.newXmlReader(java.io.InputStream)
    • read

      public org.apache.maven.model.Model read(InputStream in, boolean strict, org.apache.maven.model.InputSource source) throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException
      Method read.
      Parameters:
      in -
      source -
      strict -
      Returns:
      Model
      Throws:
      IOException
      org.codehaus.plexus.util.xml.pull.XmlPullParserException
    • setAddDefaultEntities

      public void setAddDefaultEntities(boolean addDefaultEntities)
      Sets the state of the "add default entities" flag.
      Parameters:
      addDefaultEntities -