Java 类org.apache.maven.project.DefaultProjectBuilderConfiguration 实例源码

项目: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());
}
项目:oceano    文件:AbstractStringBasedModelInterpolator.java   
/**
 * Serialize the inbound Model instance to a StringWriter, perform the regex replacement to resolve
 * POM expressions, then re-parse into the resolved Model instance.
 * <br/>
 * <b>NOTE:</b> This will result in a different instance of Model being returned!!!
 *
 * @param model   The inbound Model instance, to serialize and reference for expression resolution
 * @param context The other context map to be used during resolution
 * @return The resolved instance of the inbound Model. This is a different instance!
 *
 * @deprecated Use {@link ModelInterpolator#interpolate(Model, File, ProjectBuilderConfiguration, boolean)} instead.
 */
public Model interpolate( Model model, Map<String, ?> context, boolean strict )
    throws ModelInterpolationException
{
    Properties props = new Properties();
    props.putAll( context );

    return interpolate( model,
                        null,
                        new DefaultProjectBuilderConfiguration().setExecutionProperties( props ),
                        true );
}