/** * Id of a project definition. * <p/> * id := IDENT (DOT IDENT)* COLON IDENT (COLON IDENT)? EOL */ private Id id() { return id(false); }
/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }
Id pluginId = id(true); if (pluginId == null) { log.severe("Plugin id declaration malformed");
private Parent parent() { if (match(Kind.PARENT) == null) return null; if (match(Kind.COLON) == null) { log.severe("Expected ':' after 'inherits'"); return null; } Id parentId = id(true); if (parentId == null) { log.severe("Expected complete artifact identifier in 'parent' clause"); return null; } String relativePath = "../pom.atom"; if (match(Token.Kind.COLON) != null) { relativePath = relativePath(); if (relativePath == null) { return null; } } Parent parent = new Parent(); parent.setGroupId(parentId.getGroup()); parent.setArtifactId(parentId.getArtifact()); parent.setVersion(parentId.getVersion()); parent.setRelativePath(relativePath); return parent; }
/** * Id of a project definition. * <p/> * id := IDENT (DOT IDENT)* COLON IDENT (COLON IDENT)? EOL */ private Id id() { return id(false); }
/** * Id of a project definition. * <p/> * id := IDENT (DOT IDENT)* COLON IDENT (COLON IDENT)? EOL */ private Id id() { return id(false); }
Id projectId = id();
/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }
/** * Dependencies of a project. The real meat of it. */ private List<Id> dependencies(Token.Kind kind, boolean allowNullVersion) { indent(); if (match(kind, Token.Kind.COLON, Token.Kind.LBRACKET) == null) { return null; // no deps. } List<Id> deps = new ArrayList<Id>(); chewEols(); chewIndents(); // Slurp up the dep ids. Id id; while ((id = id(allowNullVersion)) != null) { // Optional additional params at the end. String classifier = classifier(); if (null != classifier) { id.setClassifier(classifier); } chewEols(); chewIndents(); deps.add(id); } if (match(Token.Kind.RBRACKET) == null) { // ERROR! parseException("Expected ]"); } return deps; }
Id pluginId = id(true); if (pluginId == null) { log.severe("Plugin id declaration malformed");
private Parent parent() { if (match(Kind.PARENT) == null) return null; if (match(Kind.COLON) == null) { log.severe("Expected ':' after 'inherits'"); return null; } Id parentId = id(true); if (parentId == null) { log.severe("Expected complete artifact identifier in 'parent' clause"); return null; } String relativePath = "../pom.atom"; if (match(Token.Kind.COLON) != null) { relativePath = relativePath(); if (relativePath == null) { return null; } } Parent parent = new Parent(); parent.setGroupId(parentId.getGroup()); parent.setArtifactId(parentId.getArtifact()); parent.setVersion(parentId.getVersion()); parent.setRelativePath(relativePath); return parent; }
Id pluginId = id(true); if (pluginId == null) { log.severe("Plugin id declaration malformed");
private Parent parent() { if (match(Kind.PARENT) == null) return null; if (match(Kind.COLON) == null) { log.severe("Expected ':' after 'inherits'"); return null; } Id parentId = id(true); if (parentId == null) { log.severe("Expected complete artifact identifier in 'parent' clause"); return null; } String relativePath = "../pom.atom"; if (match(Token.Kind.COLON) != null) { relativePath = relativePath(); if (relativePath == null) { return null; } } Parent parent = new Parent(); parent.setGroupId(parentId.getGroup()); parent.setArtifactId(parentId.getArtifact()); parent.setVersion(parentId.getVersion()); parent.setRelativePath(relativePath); return parent; }
Id projectId = id();
Id projectId = id();