Class AtomParser
- java.lang.Object
-
- org.sonatype.maven.polyglot.atom.parsing.AtomParser
-
public class AtomParser extends java.lang.Object
Parses the atom token stream into an internal model, which can be emitted as a Maven model.
-
-
Field Summary
Fields Modifier and Type Field Description private int
i
private java.util.logging.Logger
log
private org.apache.maven.model.building.ModelSource
modelSource
private java.util.List<Token>
tokens
-
Constructor Summary
Constructors Constructor Description AtomParser(org.apache.maven.model.building.ModelSource modelSource, java.util.List<Token> tokens)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private Token
anyOf(Token.Kind... ident)
private void
chewEols()
private void
chewIndents()
private java.lang.String
classifier()
classifier := LPAREN IDENT RPARENprivate java.util.Map<java.lang.String,java.lang.Object>
configurationMap()
private java.util.List<Id>
dependencies(Token.Kind kind, boolean allowNullVersion)
Dependencies of a project.private Id
id()
Id of a project definition.private Id
id(boolean allowNullVersion)
private java.lang.String
idFragment()
private void
indent()
private java.util.List<Token>
match(Token.Kind... ident)
private java.util.List<java.lang.String>
modules()
private org.apache.maven.model.Parent
parent()
Project
parse()
private void
parseException(java.lang.String message)
private void
parseException(java.lang.String message, java.lang.Throwable t)
private org.apache.maven.model.Plugin
plugin(Token.Kind keyword)
private java.util.List<org.apache.maven.model.Plugin>
plugins(Token.Kind keyword)
Additional plugins and their configuration.private Project
project(Repositories repositories)
Parsing rule for a single project build definition.private java.util.List<Property>
properties(Token.Kind kind)
private Property
property()
private java.lang.String
relativePath()
private Repositories
repositories()
Optional repositories declaration at the top of the file.private ScmElement
scm()
private java.util.Map<java.lang.String,java.lang.String>
srcs()
Custom directory structure for maven builds.(package private) static java.lang.String
stripQuotes(java.lang.String atom)
private org.codehaus.plexus.util.xml.Xpp3Dom
toXpp3DomTree(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config)
private java.lang.String
validateUrl(java.lang.String url)
-
-
-
Field Detail
-
log
private final java.util.logging.Logger log
-
tokens
private final java.util.List<Token> tokens
-
modelSource
private final org.apache.maven.model.building.ModelSource modelSource
-
i
private int i
-
-
Constructor Detail
-
AtomParser
public AtomParser(org.apache.maven.model.building.ModelSource modelSource, java.util.List<Token> tokens)
-
-
Method Detail
-
parseException
private void parseException(java.lang.String message, java.lang.Throwable t)
-
parseException
private void parseException(java.lang.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 java.util.Map<java.lang.String,java.lang.String> srcs()
Custom directory structure for maven builds.
-
dependencies
private java.util.List<Id> dependencies(Token.Kind kind, boolean allowNullVersion)
Dependencies of a project. The real meat of it.
-
plugins
private java.util.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(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> config)
-
configurationMap
private java.util.Map<java.lang.String,java.lang.Object> configurationMap()
-
stripQuotes
static java.lang.String stripQuotes(java.lang.String atom)
-
properties
private java.util.List<Property> properties(Token.Kind kind)
-
modules
private java.util.List<java.lang.String> modules()
-
classifier
private java.lang.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 java.lang.String relativePath()
-
idFragment
private java.lang.String idFragment()
-
repositories
private Repositories repositories()
Optional repositories declaration at the top of the file. repositories := 'repositories' LEFT_WAVE STRING (COMMA STRING)*
-
validateUrl
private java.lang.String validateUrl(java.lang.String url)
-
indent
private void indent()
-
anyOf
private Token anyOf(Token.Kind... ident)
-
match
private java.util.List<Token> match(Token.Kind... ident)
-
chewEols
private void chewEols()
-
chewIndents
private void chewIndents()
-
-