Class AtomParser

java.lang.Object
org.sonatype.maven.polyglot.atom.parsing.AtomParser

public class AtomParser extends Object
Parses the atom token stream into an internal model, which can be emitted as a Maven model.
  • Field Details

    • log

      private final Logger log
    • tokens

      private final List<Token> tokens
    • modelSource

      private final org.apache.maven.model.building.ModelSource modelSource
    • i

      private int i
  • Constructor Details

    • AtomParser

      public AtomParser(org.apache.maven.model.building.ModelSource modelSource, List<Token> tokens)
  • Method Details

    • parseException

      private void parseException(String message, Throwable t)
    • parseException

      private void parseException(String message)
    • parse

      public Project parse()
    • project

      private Project project(Repositories repositories)
      Parsing rule for a single project build definition. project := 'project' STRING (AT URL)? ('as' PACKAGING)? EOL (idFragment COLON list EOL)+
    • scm

      private ScmElement scm()
    • srcs

      private Map<String,String> srcs()
      Custom directory structure for maven builds.
    • dependencies

      private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion)
      Dependencies of a project. The real meat of it.
    • plugins

      private List<org.apache.maven.model.Plugin> plugins(Token.Kind keyword)
      Additional plugins and their configuration.
    • plugin

      private org.apache.maven.model.Plugin plugin(Token.Kind keyword)
    • toXpp3DomTree

      private org.codehaus.plexus.util.xml.Xpp3Dom toXpp3DomTree(String name, Map<String,Object> config)
    • configurationMap

      private Map<String,Object> configurationMap()
    • stripQuotes

      static String stripQuotes(String atom)
    • properties

      private List<Property> properties(Token.Kind kind)
    • modules

      private List<String> modules()
    • classifier

      private String classifier()
      classifier := LPAREN IDENT RPAREN
    • property

      private Property property()
    • id

      private Id id()
      Id of a project definition.

      id := IDENT (DOT IDENT)* COLON IDENT (COLON IDENT)? EOL

    • id

      private Id id(boolean allowNullVersion)
    • parent

      private org.apache.maven.model.Parent parent()
    • relativePath

      private String relativePath()
    • idFragment

      private String idFragment()
    • repositories

      private Repositories repositories()
      Optional repositories declaration at the top of the file.

      repositories := 'repositories' LEFT_WAVE STRING (COMMA STRING)*

    • validateUrl

      private String validateUrl(String url)
    • indent

      private void indent()
    • anyOf

      private Token anyOf(Token.Kind... ident)
    • match

      private List<Token> match(Token.Kind... ident)
    • chewEols

      private void chewEols()
    • chewIndents

      private void chewIndents()