Java 类org.apache.maven.project.interpolation.ModelInterpolationException 实例源码

项目:intellij-ce-playground    文件:CustomMaven3ModelInterpolator.java   
@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 {
      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);
    }
  }
}
项目:intellij-ce-playground    文件:CustomModelInterpolator.java   
@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 {
      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);
    }
  }
}
项目:tools-idea    文件:CustomMaven3ModelInterpolator.java   
@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 {
      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);
    }
  }
}
项目:tools-idea    文件:CustomModelInterpolator.java   
@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 {
      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);
    }
  }
}
项目:greenpepper    文件:CommandLineRunner.java   
private void interpolateProject() throws InitializationException, Exception, ModelInterpolationException {
    StringSearchModelInterpolator interpolator = new StringSearchModelInterpolator(new DefaultPathTranslator());
    interpolator.enableLogging(new PlexusLoggerAdapter(embedder.getLogger()));
    interpolator.initialize();
    ProjectBuilderConfiguration config =  new DefaultProjectBuilderConfiguration();
    config.setLocalRepository(getLocalRepository());
    config.setGlobalProfileManager(getProfileManager());
    interpolator.interpolate(project.getModel(), project.getBasedir(), config, logger.isDebugEnabled());
}