All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.bootstrap.resolver.maven.BootstrapModelBuilderFactory Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.bootstrap.resolver.maven;

import org.apache.maven.model.Model;
import org.apache.maven.model.building.DefaultModelBuilderFactory;
import org.apache.maven.model.building.ModelBuilder;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelProblemCollector;
import org.apache.maven.model.validation.ModelValidator;

public class BootstrapModelBuilderFactory extends DefaultModelBuilderFactory {

    private static ModelBuilder delegate;

    public static ModelBuilder getDefaultModelBuilder() {
        return delegate == null ? delegate = new BootstrapModelBuilderFactory().newInstance() : delegate;
    }

    @Override
    protected ModelValidator newModelValidator() {
        return new ModelValidator() {
            @Override
            public void validateRawModel(Model model, ModelBuildingRequest request, ModelProblemCollector problems) {
            }

            @Override
            public void validateEffectiveModel(Model model, ModelBuildingRequest request, ModelProblemCollector problems) {
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy