Interface ModelBuilderResult


@Experimental public interface ModelBuilderResult
Result of a project build call.
Since:
4.0.0
  • Method Details

    • getModelIds

      @Nonnull List<String> getModelIds()
      Gets the sequence of model identifiers that denote the lineage of models from which the effective model was constructed. Model identifiers have the form <groupId>:<artifactId>:<version>. The first identifier from the list denotes the model on which the model builder was originally invoked. The last identifier will always be an empty string that by definition denotes the super POM.
      Returns:
      The model identifiers from the lineage of models, never null.
    • getFileModel

      @Nonnull Model getFileModel()
      Gets the file model.
      Returns:
      the file model, never null.
    • getActivatedFileModel

      @Nonnull Model getActivatedFileModel()
      Returns the file model + profile injection.
      Returns:
      the activated file model, never null.
    • getRawModel

      @Nonnull Model getRawModel()
      Gets the file model + build pom transformation, without inheritance nor interpolation.
      Returns:
      The raw model, never null.
    • getEffectiveModel

      @Nonnull Model getEffectiveModel()
      Gets the assembled model with inheritance, interpolation and profile injection.
      Returns:
      The assembled model, never null.
    • getRawModel

      @Nonnull Optional<Model> getRawModel(@Nonnull String modelId)
      Gets the specified raw model as it was read from a model source. Apart from basic validation, a raw model has not undergone any updates by the model builder, e.g. reflects neither inheritance nor interpolation. The model identifier should be from the collection obtained by getModelIds(). As a special case, an empty string can be used as the identifier for the super POM.
      Parameters:
      modelId - The identifier of the desired raw model, must not be null.
      Returns:
      The raw model or null if the specified model id does not refer to a known model.
    • getActivePomProfiles

      @Nonnull List<Profile> getActivePomProfiles(@Nonnull String modelId)
      Gets the profiles from the specified model that were active during model building. The model identifier should be from the collection obtained by getModelIds(). As a special case, an empty string can be used as the identifier for the super POM.
      Parameters:
      modelId - The identifier of the model whose active profiles should be retrieved, must not be null.
      Returns:
      The active profiles of the model or an empty list if the specified model id does not refer to a known model or has no active profiles.
    • getActiveExternalProfiles

      @Nonnull List<Profile> getActiveExternalProfiles()
      Gets the external profiles that were active during model building. External profiles are those that were contributed by ModelBuilderRequest.getProfiles().
      Returns:
      The active external profiles or an empty list if none, never null.
    • getProblems

      @Nonnull List<ModelProblem> getProblems()
      Gets the problems that were encountered during the project building.
      Returns:
      the problems that were encountered during the project building, can be empty but never null
    • toString

      String toString()
      Creates a human readable representation of these errors.
      Overrides:
      toString in class Object