public void execute()

in enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/EvaluateBeanshell.java [63:80]


    public void execute() throws EnforcerRuleException {

        try {
            getLog().debug("Echo condition : " + condition);
            // Evaluate condition within Plexus Container
            String script = (String) evaluator.evaluate(condition);
            getLog().debug("Echo script : " + script);
            if (!evaluateCondition(script)) {
                String message = getMessage();
                if (message == null || message.isEmpty()) {
                    message = "The expression \"" + condition + "\" is not true.";
                }
                throw new EnforcerRuleException(message);
            }
        } catch (ExpressionEvaluationException e) {
            throw new EnforcerRuleException("Unable to evaluate an expression '" + condition + "'", e);
        }
    }