Java Code Examples for org.apache.maven.model.building.ModelProblemCollector

The following examples show how to use org.apache.maven.model.building.ModelProblemCollector. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: flatten-maven-plugin   Source File: CiModelInterpolator.java    License: Apache License 2.0 5 votes vote down vote up
protected void interpolateObject(Object obj, Model model, File projectDir, ModelBuildingRequest config,
		ModelProblemCollector problems) {
	try {
		List<? extends ValueSource> valueSources = createValueSources(model, projectDir, config, problems);
		List<? extends InterpolationPostProcessor> postProcessors = createPostProcessors(model, projectDir, config);

		InterpolateObjectAction action = new InterpolateObjectAction(obj, valueSources, postProcessors, this,
				problems);

		AccessController.doPrivileged(action);
	} finally {
		getInterpolator().clearAnswers();
	}
}
 
Example 2
Source Project: flatten-maven-plugin   Source File: CiModelInterpolator.java    License: Apache License 2.0 5 votes vote down vote up
public InterpolateObjectAction(Object target, List<? extends ValueSource> valueSources,
		List<? extends InterpolationPostProcessor> postProcessors, CiModelInterpolator modelInterpolator,
		ModelProblemCollector problems) {
	this.valueSources = valueSources;
	this.postProcessors = postProcessors;

	this.interpolationTargets = new LinkedList<Object>();
	interpolationTargets.add(target);

	this.modelInterpolator = modelInterpolator;

	this.problems = problems;
}
 
Example 3
Source Project: flatten-maven-plugin   Source File: CiModelInterpolator.java    License: Apache License 2.0 5 votes vote down vote up
public ProblemDetectingValueSource(ValueSource valueSource, String bannedPrefix, String newPrefix,
		ModelProblemCollector problems) {
	this.valueSource = valueSource;
	this.bannedPrefix = bannedPrefix;
	this.newPrefix = newPrefix;
	this.problems = problems;
}
 
Example 4
Source Project: flatten-maven-plugin   Source File: CiModelInterpolator.java    License: Apache License 2.0 4 votes vote down vote up
public Model interpolateModel(Model model, File projectDir, ModelBuildingRequest config,
		ModelProblemCollector problems) {
	interpolateObject(model, model, projectDir, config, problems);

	return model;
}
 
Example 5
Source Project: archiva   Source File: DummyLifecycleBindingsInjector.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void injectLifecycleBindings( Model model, ModelBuildingRequest modelBuildingRequest, ModelProblemCollector modelProblemCollector )
{
    // left intentionally blank
}
 
Example 6
Source Project: flatten-maven-plugin   Source File: CiInterpolator.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Interpolates expressions in the specified model. Note that implementations are free to either interpolate the
 * provided model directly or to create a clone of the model and interpolate the clone. Callers should always use
 * the returned model and must not rely on the input model being updated.
 *
 * @param model The model to interpolate, must not be {@code null}.
 * @param projectDir The project directory, may be {@code null} if the model does not belong to a local project but
 *            to some artifact's metadata.
 * @param request The model building request that holds further settings, must not be {@code null}.
 * @param problems The container used to collect problems that were encountered, must not be {@code null}.
 * @return The interpolated model, never {@code null}.
 */
Model interpolateModel( Model model, File projectDir, ModelBuildingRequest request,
                        ModelProblemCollector problems );