Example usage for org.apache.maven.project.interpolation ModelInterpolationException ModelInterpolationException

List of usage examples for org.apache.maven.project.interpolation ModelInterpolationException ModelInterpolationException

Introduction

In this page you can find the example usage for org.apache.maven.project.interpolation ModelInterpolationException ModelInterpolationException.

Prototype

public ModelInterpolationException(String expression, String message) 

Source Link

Usage

From source file:org.jetbrains.idea.maven.server.embedder.CustomMaven3ModelInterpolator.java

License:Apache License

@Override
protected void interpolateObject(Object obj, Model model, File projectDir, ProjectBuilderConfiguration config,
        boolean debugEnabled) throws ModelInterpolationException {
    // IDEA-74131 avoid concurrent access to the static cache in StringSearchModelInterpolator
    synchronized (CustomMaven3ModelInterpolator.class) {
        try {/*from w  ww . j  a  va  2s .  c  o m*/
            super.interpolateObject(obj, model, projectDir, config, debugEnabled);
        } catch (NullPointerException e) {
            // npe may be thrown from here:
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.isQualifiedForInterpolation(StringSearchModelInterpolator.java:344)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:172)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:328)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:135)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:102)
            throw new ModelInterpolationException("Cannot interpolate", e);
        }
    }
}

From source file:org.jetbrains.idea.maven.server.embedder.CustomModelInterpolator.java

License:Apache License

@Override
protected void interpolateObject(Object obj, Model model, File projectDir, ProjectBuilderConfiguration config,
        boolean debugEnabled) throws ModelInterpolationException {
    // IDEA-74131 avoid concurrent access to the static cache in StringSearchModelInterpolator
    synchronized (CustomModelInterpolator.class) {
        try {/*from w w  w  . jav  a 2 s  . co  m*/
            super.interpolateObject(obj, model, projectDir, config, debugEnabled);
        } catch (NullPointerException e) {
            // npe may be thrown from here:
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.isQualifiedForInterpolation(StringSearchModelInterpolator.java:344)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:172)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.traverseObjectWithParents(StringSearchModelInterpolator.java:328)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:135)
            //at org.apache.maven.project.interpolation.StringSearchModelInterpolator$InterpolateObjectAction.run(StringSearchModelInterpolator.java:102)
            throw new ModelInterpolationException("Cannot interpolate", e);
        }
    }
}