apache/maven · error · RuntimeException
Unknown function: ${name}
Error message
Unknown function: ${name} What it means
Error "Unknown function: ${name}" thrown in apache/maven.
Source
Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:359
/**
* Parses a token that could be either a variable or an unknown function.
*
* @return the result of parsing a variable or unknown function
* @throws RuntimeException if an unknown function is encountered
*/
private Object parseVariableOrUnknownFunction() {
current--; // Move back to the token we couldn't parse as a number
String name = tokens.get(current);
current++;
// Check if it's followed by an opening parenthesis, indicating a function call
if (current < tokens.size() && tokens.get(current).equals("(")) {
// It's a function call, parse it as such
List<Object> args = parseArgumentList();
if (functions.containsKey(name)) {
return functions.get(name).apply(args);
} else {
throw new RuntimeException("Unknown function: " + name);
}
} else {
// It's a variable
// Here you might want to handle variables differently
// For now, we'll throw an exception
throw new RuntimeException("Unknown variable: " + name);
}
}
/**
* Parses a list of arguments for a function call.
*
* @return a list of parsed arguments
* @throws RuntimeException if there's a mismatch in parentheses
*/
private List<Object> parseArgumentList() {
List<Object> args = new ArrayList<>();
current++; // Skip the opening parenthesisView on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:359 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/2c3d7d352c222cc0.
Report an issue: GitHub.