Package org.apache.maven.project
Class DefaultProjectBuildingResult
java.lang.Object
org.apache.maven.project.DefaultProjectBuildingResult
- All Implemented Interfaces:
ProjectBuildingResult
Collects the output of the project builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DependencyResolutionResult
private File
private List<ModelProblem>
private MavenProject
private String
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProjectBuildingResult
(String projectId, File pomFile, List<ModelProblem> problems) Creates a new result with the specified contents.DefaultProjectBuildingResult
(MavenProject project, List<ModelProblem> problems, DependencyResolutionResult dependencyResolutionResult) Creates a new result with the specified contents. -
Method Summary
Modifier and TypeMethodDescriptionGets the result of the dependency resolution for the project.Gets the POM file from which the project was built.Gets the problems that were encountered during the project building.Gets the project that was built.Gets the identifier of the project that could not be built.
-
Field Details
-
projectId
-
pomFile
-
project
-
problems
-
dependencyResolutionResult
-
-
Constructor Details
-
DefaultProjectBuildingResult
DefaultProjectBuildingResult(MavenProject project, List<ModelProblem> problems, DependencyResolutionResult dependencyResolutionResult) Creates a new result with the specified contents.- Parameters:
project
- The project that was built, may benull
.problems
- The problems that were encountered, may benull
.dependencyResolutionResult
- The result of the resolution for the project dependencies, may benull
.
-
DefaultProjectBuildingResult
DefaultProjectBuildingResult(String projectId, File pomFile, List<ModelProblem> problems) Creates a new result with the specified contents.- Parameters:
projectId
- The identifier of the project, may benull
.pomFile
- The POM file from which the project was built, may benull
.problems
- The problems that were encountered, may benull
.
-
-
Method Details
-
getProjectId
Description copied from interface:ProjectBuildingResult
Gets the identifier of the project that could not be built. The general format of the identifier is<groupId>:<artifactId>:<version>
but some of these coordinates may still be unknown at the point the exception is thrown so this information is merely meant to assist the user.- Specified by:
getProjectId
in interfaceProjectBuildingResult
- Returns:
- The identifier of the project or an empty string if not known, never
null
.
-
getPomFile
Description copied from interface:ProjectBuildingResult
Gets the POM file from which the project was built.- Specified by:
getPomFile
in interfaceProjectBuildingResult
- Returns:
- The POM file or
null
if unknown.
-
getProject
Description copied from interface:ProjectBuildingResult
Gets the project that was built.- Specified by:
getProject
in interfaceProjectBuildingResult
- Returns:
- The project that was built or
null
if an error occurred and this result accompanies aProjectBuildingException
.
-
getProblems
Description copied from interface:ProjectBuildingResult
Gets the problems that were encountered during the project building.- Specified by:
getProblems
in interfaceProjectBuildingResult
- Returns:
- The problems that were encountered during the project building, can be empty but never
null
.
-
getDependencyResolutionResult
Description copied from interface:ProjectBuildingResult
Gets the result of the dependency resolution for the project.- Specified by:
getDependencyResolutionResult
in interfaceProjectBuildingResult
- Returns:
- The result of the dependency resolution for the project or
null
if the project dependencies were not requested.
-