Package org.apache.maven.model.building
Class DefaultModelBuilder
java.lang.Object
org.apache.maven.model.building.DefaultModelBuilder
- All Implemented Interfaces:
ModelBuilder
@Named
@Singleton
@Deprecated(since="4.0.0")
public class DefaultModelBuilder
extends Object
implements ModelBuilder
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DependencyManagementImporter
Deprecated.private final DependencyManagementInjector
Deprecated.private final InheritanceAssembler
Deprecated.private final LifecycleBindingsInjector
Deprecated.private final ModelInterpolator
Deprecated.private final ModelNormalizer
Deprecated.private final ModelPathTranslator
Deprecated.private final ModelProcessor
Deprecated.private final ModelUrlNormalizer
Deprecated.private final ModelValidator
Deprecated.private final PluginConfigurationExpander
Deprecated.private final PluginManagementInjector
Deprecated.private final ProfileActivationFilePathInterpolator
Deprecated.private final ProfileInjector
Deprecated.private final ProfileSelector
Deprecated.private final ReportConfigurationExpander
Deprecated.private final SuperPomProvider
Deprecated.private final ModelSourceTransformer
Deprecated.private final ModelVersionParser
Deprecated.private final ModelVersionProcessor
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultModelBuilder
(ModelProcessor modelProcessor, ModelValidator modelValidator, ModelNormalizer modelNormalizer, ModelInterpolator modelInterpolator, ModelPathTranslator modelPathTranslator, ModelUrlNormalizer modelUrlNormalizer, SuperPomProvider superPomProvider, InheritanceAssembler inheritanceAssembler, ProfileSelector profileSelector, ProfileInjector profileInjector, PluginManagementInjector pluginManagementInjector, DependencyManagementInjector dependencyManagementInjector, DependencyManagementImporter dependencyManagementImporter, LifecycleBindingsInjector lifecycleBindingsInjector, PluginConfigurationExpander pluginConfigurationExpander, ReportConfigurationExpander reportConfigurationExpander, ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator, ModelVersionProcessor versionProcessor, ModelSourceTransformer transformer, ModelVersionParser versionParser) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
activateFileModel
(ModelBuildingRequest request, DefaultModelBuildingResult result, DefaultModelProblemCollector problems) Deprecated.private static Dependency
addExclusions
(Dependency candidate, List<Exclusion> exclusions) Deprecated.private static void
addInterpolationProblem
(DefaultModelProblemCollector problems, InputLocationTracker target, String path, org.codehaus.plexus.interpolation.InterpolationException e, String locationKey) Deprecated.private DefaultModelBuildingResult
asDefaultModelBuildingResult
(ModelBuildingResult phaseOneResult) Deprecated.private Model
assembleInheritance
(List<Model> lineage, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated.private static <T> Supplier
<T> asSupplier
(Callable<T> supplier) Deprecated.build
(ModelBuildingRequest request) Deprecated.Builds the effective model of the specified POM.protected ModelBuildingResult
build
(ModelBuildingRequest request, Collection<String> importIds) Deprecated.build
(ModelBuildingRequest request, ModelBuildingResult result) Deprecated.Builds the effective model by completing the specified interim result which was produced by a previous call toModelBuilder.build(ModelBuildingRequest)
withModelBuildingRequest.isTwoPhaseBuilding()
beingtrue
.private ModelBuildingResult
build
(ModelBuildingRequest request, ModelBuildingResult phaseOneResult, Collection<String> imports) Deprecated.buildRawModel
(File pomFile, int validationLevel, boolean locationTracking) Deprecated.buildRawModel
(File pomFile, int validationLevel, boolean locationTracking, TransformerContext context) Deprecated.buildRawModel
(Path pomFile, int validationLevel, boolean locationTracking) Deprecated.Performs only the part ofModelBuilder.build(ModelBuildingRequest)
that loads the raw modelbuildRawModel
(Path pomFile, int validationLevel, boolean locationTracking, TransformerContext context) Deprecated.buildRawModel
(ModelBuildingRequest request) Deprecated.private static <T> T
cache
(ModelCache cache, String groupId, String artifactId, String version, ModelCacheTag<T> tag, Callable<T> supplier) Deprecated.private static <T> T
cache
(ModelCache cache, Source source, ModelCacheTag<T> tag, Callable<T> supplier) Deprecated.private void
checkPluginVersions
(List<Model> lineage, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated.private void
configureResolver
(ModelResolver modelResolver, Model model, DefaultModelProblemCollector problems, boolean replaceRepositories) Deprecated.private boolean
containsCoordinates
(String message, String groupId, String artifactId, String version) Deprecated.private DependencyManagement
doLoadDependencyManagement
(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Dependency dependency, String groupId, String artifactId, String version, Collection<String> importIds) Deprecated.private Model
doReadFileModel
(ModelSource modelSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.private ModelData
doReadRawModel
(ModelSource modelSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.private void
fireEvent
(Model model, ModelBuildingRequest request, ModelProblemCollector problems, ModelBuildingEventCatapult catapult) Deprecated.private String
getGroupId
(Model model) Deprecated.(package private) String
getGroupId
(Model model) Deprecated.(package private) ModelProcessor
Deprecated.private ModelSource2
getParentPomFile
(Model childModel, Source source) Deprecated.private DefaultProfileActivationContext
Deprecated.private Map
<String, Activation> getProfileActivations
(Model model, boolean clone) Deprecated.private Model
getSuperModel
(String modelVersion) Deprecated.private String
getVersion
(Model model) Deprecated.protected boolean
hasFatalErrors
(ModelProblemCollectorExt problems) Deprecated.protected boolean
hasModelErrors
(ModelProblemCollectorExt problems) Deprecated.private void
importDependencyManagement
(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Collection<String> importIds) Deprecated.private void
injectProfileActivations
(Model model, Map<String, Activation> activations) Deprecated.interpolateActivations
(List<Profile> profiles, DefaultProfileActivationContext context, DefaultModelProblemCollector problems) Deprecated.private Model
interpolateModel
(Model model, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated.private static boolean
isNotEmpty
(String string) Deprecated.private DependencyManagement
loadDependencyManagement
(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Dependency dependency, Collection<String> importIds) Deprecated.private boolean
Deprecated.private boolean
match
(Exclusion exclusion, Dependency candidate) Deprecated.Deprecated.private boolean
rawChildVersionReferencesParent
(String rawChildModelVersion) Deprecated.private Model
readEffectiveModel
(ModelBuildingRequest request, DefaultModelBuildingResult result, DefaultModelProblemCollector problems) Deprecated.(package private) Model
readFileModel
(ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.private ModelData
readParent
(Model childModel, Source childSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.private ModelData
readParentExternally
(Model childModel, ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.private ModelData
readParentLocally
(Model childModel, Source childSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.(package private) Model
readRawModel
(ModelBuildingRequest request, DefaultModelProblemCollector problems) Deprecated.setDependencyManagementImporter
(DependencyManagementImporter dependencyManagementImporter) Deprecated.since Maven 4setDependencyManagementInjector
(DependencyManagementInjector dependencyManagementInjector) Deprecated.since Maven 4setInheritanceAssembler
(InheritanceAssembler inheritanceAssembler) Deprecated.since Maven 4setLifecycleBindingsInjector
(LifecycleBindingsInjector lifecycleBindingsInjector) Deprecated.since Maven 4setModelInterpolator
(ModelInterpolator modelInterpolator) Deprecated.since Maven 4setModelNormalizer
(ModelNormalizer modelNormalizer) Deprecated.since Maven 4setModelPathTranslator
(ModelPathTranslator modelPathTranslator) Deprecated.since Maven 4setModelProcessor
(ModelProcessor modelProcessor) Deprecated.since Maven 4setModelUrlNormalizer
(ModelUrlNormalizer modelUrlNormalizer) Deprecated.since Maven 4setModelValidator
(ModelValidator modelValidator) Deprecated.since Maven 4setPluginConfigurationExpander
(PluginConfigurationExpander pluginConfigurationExpander) Deprecated.since Maven 4setPluginManagementInjector
(PluginManagementInjector pluginManagementInjector) Deprecated.since Maven 4setProfileActivationFilePathInterpolator
(ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator) Deprecated.since Maven 4setProfileInjector
(ProfileInjector profileInjector) Deprecated.since Maven 4setProfileSelector
(ProfileSelector profileSelector) Deprecated.since Maven 4setReportConfigurationExpander
(ReportConfigurationExpander reportConfigurationExpander) Deprecated.since Maven 4setReportingConverter
(ReportingConverter reportingConverter) Deprecated.since Maven 4setSuperPomProvider
(SuperPomProvider superPomProvider) Deprecated.since Maven 4(package private) static <T extends Throwable>
voidDeprecated.
-
Field Details
-
modelProcessor
Deprecated. -
modelValidator
Deprecated. -
modelNormalizer
Deprecated. -
modelInterpolator
Deprecated. -
modelPathTranslator
Deprecated. -
modelUrlNormalizer
Deprecated. -
superPomProvider
Deprecated. -
inheritanceAssembler
Deprecated. -
profileSelector
Deprecated. -
profileInjector
Deprecated. -
pluginManagementInjector
Deprecated. -
dependencyManagementInjector
Deprecated. -
dependencyManagementImporter
Deprecated. -
lifecycleBindingsInjector
Deprecated. -
pluginConfigurationExpander
Deprecated. -
reportConfigurationExpander
Deprecated. -
profileActivationFilePathInterpolator
Deprecated. -
versionProcessor
Deprecated. -
transformer
Deprecated. -
versionParser
Deprecated.
-
-
Constructor Details
-
DefaultModelBuilder
@Inject public DefaultModelBuilder(ModelProcessor modelProcessor, ModelValidator modelValidator, ModelNormalizer modelNormalizer, ModelInterpolator modelInterpolator, ModelPathTranslator modelPathTranslator, ModelUrlNormalizer modelUrlNormalizer, SuperPomProvider superPomProvider, InheritanceAssembler inheritanceAssembler, ProfileSelector profileSelector, ProfileInjector profileInjector, PluginManagementInjector pluginManagementInjector, DependencyManagementInjector dependencyManagementInjector, DependencyManagementImporter dependencyManagementImporter, @Nullable LifecycleBindingsInjector lifecycleBindingsInjector, PluginConfigurationExpander pluginConfigurationExpander, ReportConfigurationExpander reportConfigurationExpander, ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator, ModelVersionProcessor versionProcessor, ModelSourceTransformer transformer, ModelVersionParser versionParser) Deprecated.
-
-
Method Details
-
setModelProcessor
Deprecated.since Maven 4- See Also:
-
setModelValidator
Deprecated.since Maven 4- See Also:
-
setModelNormalizer
Deprecated.since Maven 4- See Also:
-
setModelInterpolator
Deprecated.since Maven 4- See Also:
-
setModelPathTranslator
@Deprecated public DefaultModelBuilder setModelPathTranslator(ModelPathTranslator modelPathTranslator) Deprecated.since Maven 4- See Also:
-
setModelUrlNormalizer
Deprecated.since Maven 4- See Also:
-
setSuperPomProvider
Deprecated.since Maven 4- See Also:
-
setInheritanceAssembler
@Deprecated public DefaultModelBuilder setInheritanceAssembler(InheritanceAssembler inheritanceAssembler) Deprecated.since Maven 4- See Also:
-
setProfileSelector
Deprecated.since Maven 4- See Also:
-
setProfileInjector
Deprecated.since Maven 4- See Also:
-
setPluginManagementInjector
@Deprecated public DefaultModelBuilder setPluginManagementInjector(PluginManagementInjector pluginManagementInjector) Deprecated.since Maven 4- See Also:
-
setDependencyManagementInjector
@Deprecated public DefaultModelBuilder setDependencyManagementInjector(DependencyManagementInjector dependencyManagementInjector) Deprecated.since Maven 4- See Also:
-
setDependencyManagementImporter
@Deprecated public DefaultModelBuilder setDependencyManagementImporter(DependencyManagementImporter dependencyManagementImporter) Deprecated.since Maven 4- See Also:
-
setLifecycleBindingsInjector
@Deprecated public DefaultModelBuilder setLifecycleBindingsInjector(LifecycleBindingsInjector lifecycleBindingsInjector) Deprecated.since Maven 4- See Also:
-
setPluginConfigurationExpander
@Deprecated public DefaultModelBuilder setPluginConfigurationExpander(PluginConfigurationExpander pluginConfigurationExpander) Deprecated.since Maven 4- See Also:
-
setReportConfigurationExpander
@Deprecated public DefaultModelBuilder setReportConfigurationExpander(ReportConfigurationExpander reportConfigurationExpander) Deprecated.since Maven 4- See Also:
-
setProfileActivationFilePathInterpolator
@Deprecated public DefaultModelBuilder setProfileActivationFilePathInterpolator(ProfileActivationFilePathInterpolator profileActivationFilePathInterpolator) Deprecated.since Maven 4- See Also:
-
setReportingConverter
Deprecated.since Maven 4- See Also:
-
newTransformerContextBuilder
Deprecated.- Specified by:
newTransformerContextBuilder
in interfaceModelBuilder
-
build
Deprecated.Description copied from interface:ModelBuilder
Builds the effective model of the specified POM.- Specified by:
build
in interfaceModelBuilder
- Parameters:
request
- The model building request that holds the parameters, must not benull
.- Returns:
- The result of the model building, never
null
. - Throws:
ModelBuildingException
- If the effective model could not be built.
-
build
protected ModelBuildingResult build(ModelBuildingRequest request, Collection<String> importIds) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
activateFileModel
private void activateFileModel(ModelBuildingRequest request, DefaultModelBuildingResult result, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
readEffectiveModel
private Model readEffectiveModel(ModelBuildingRequest request, DefaultModelBuildingResult result, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
interpolateActivations
private List<Profile> interpolateActivations(List<Profile> profiles, DefaultProfileActivationContext context, DefaultModelProblemCollector problems) Deprecated. -
addInterpolationProblem
private static void addInterpolationProblem(DefaultModelProblemCollector problems, InputLocationTracker target, String path, org.codehaus.plexus.interpolation.InterpolationException e, String locationKey) Deprecated. -
isNotEmpty
Deprecated. -
build
public ModelBuildingResult build(ModelBuildingRequest request, ModelBuildingResult result) throws ModelBuildingException Deprecated.Description copied from interface:ModelBuilder
Builds the effective model by completing the specified interim result which was produced by a previous call toModelBuilder.build(ModelBuildingRequest)
withModelBuildingRequest.isTwoPhaseBuilding()
beingtrue
. The model building request passed to this method must be the same as the one used for the first phase of the model building.- Specified by:
build
in interfaceModelBuilder
- Parameters:
request
- The model building request that holds the parameters, must not benull
.result
- The interim result of the first phase of model building, must not benull
.- Returns:
- The result of the model building, never
null
. - Throws:
ModelBuildingException
- If the effective model could not be built.
-
buildRawModel
Deprecated.- Throws:
ModelBuildingException
-
build
private ModelBuildingResult build(ModelBuildingRequest request, ModelBuildingResult phaseOneResult, Collection<String> imports) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
asDefaultModelBuildingResult
Deprecated. -
buildRawModel
@Deprecated public Result<? extends Model> buildRawModel(File pomFile, int validationLevel, boolean locationTracking) Deprecated.Description copied from interface:ModelBuilder
Performs only the part ofModelBuilder.build(ModelBuildingRequest)
that loads the raw model- Specified by:
buildRawModel
in interfaceModelBuilder
-
buildRawModel
public Result<? extends Model> buildRawModel(Path pomFile, int validationLevel, boolean locationTracking) Deprecated.Description copied from interface:ModelBuilder
Performs only the part ofModelBuilder.build(ModelBuildingRequest)
that loads the raw model- Specified by:
buildRawModel
in interfaceModelBuilder
-
buildRawModel
@Deprecated public Result<? extends Model> buildRawModel(File pomFile, int validationLevel, boolean locationTracking, TransformerContext context) Deprecated.- Specified by:
buildRawModel
in interfaceModelBuilder
-
buildRawModel
public Result<? extends Model> buildRawModel(Path pomFile, int validationLevel, boolean locationTracking, TransformerContext context) Deprecated.- Specified by:
buildRawModel
in interfaceModelBuilder
-
readFileModel
Model readFileModel(ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
doReadFileModel
private Model doReadFileModel(ModelSource modelSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
readRawModel
Model readRawModel(ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
doReadRawModel
private ModelData doReadRawModel(ModelSource modelSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
getGroupId
Deprecated. -
getGroupId
Deprecated. -
getVersion
Deprecated. -
getProfileActivationContext
Deprecated. -
configureResolver
private void configureResolver(ModelResolver modelResolver, Model model, DefaultModelProblemCollector problems, boolean replaceRepositories) Deprecated. -
checkPluginVersions
private void checkPluginVersions(List<Model> lineage, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated. -
assembleInheritance
private Model assembleInheritance(List<Model> lineage, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated. -
getProfileActivations
Deprecated. -
injectProfileActivations
Deprecated. -
interpolateModel
private Model interpolateModel(Model model, ModelBuildingRequest request, ModelProblemCollector problems) Deprecated. -
readParent
private ModelData readParent(Model childModel, Source childSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
readParentLocally
private ModelData readParentLocally(Model childModel, Source childSource, ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
rawChildVersionReferencesParent
Deprecated. -
getParentPomFile
Deprecated. -
readParentExternally
private ModelData readParentExternally(Model childModel, ModelBuildingRequest request, DefaultModelProblemCollector problems) throws ModelBuildingException Deprecated.- Throws:
ModelBuildingException
-
getSuperModel
Deprecated. -
importDependencyManagement
private void importDependencyManagement(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Collection<String> importIds) Deprecated. -
loadDependencyManagement
private DependencyManagement loadDependencyManagement(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Dependency dependency, Collection<String> importIds) Deprecated. -
addExclusions
Deprecated. -
match
Deprecated. -
match
Deprecated. -
doLoadDependencyManagement
private DependencyManagement doLoadDependencyManagement(Model model, ModelBuildingRequest request, DefaultModelProblemCollector problems, Dependency dependency, String groupId, String artifactId, String version, Collection<String> importIds) Deprecated. -
cache
private static <T> T cache(ModelCache cache, String groupId, String artifactId, String version, ModelCacheTag<T> tag, Callable<T> supplier) Deprecated. -
cache
private static <T> T cache(ModelCache cache, Source source, ModelCacheTag<T> tag, Callable<T> supplier) Deprecated. -
asSupplier
Deprecated. -
uncheckedThrow
Deprecated.- Throws:
T
-
fireEvent
private void fireEvent(Model model, ModelBuildingRequest request, ModelProblemCollector problems, ModelBuildingEventCatapult catapult) Deprecated. -
containsCoordinates
private boolean containsCoordinates(String message, String groupId, String artifactId, String version) Deprecated. -
hasModelErrors
Deprecated. -
hasFatalErrors
Deprecated. -
getModelProcessor
ModelProcessor getModelProcessor()Deprecated.
-
ModelBuilder
instead