Package org.apache.maven.project
Class DefaultProjectBuildingResult
- java.lang.Object
-
- org.apache.maven.project.DefaultProjectBuildingResult
-
- All Implemented Interfaces:
ProjectBuildingResult
class DefaultProjectBuildingResult extends java.lang.Object implements ProjectBuildingResult
Collects the output of the project builder.
-
-
Field Summary
Fields Modifier and Type Field Description private DependencyResolutionResultdependencyResolutionResultprivate java.io.FilepomFileprivate java.util.List<ModelProblem>problemsprivate MavenProjectprojectprivate java.lang.StringprojectId
-
Constructor Summary
Constructors Constructor Description DefaultProjectBuildingResult(java.lang.String projectId, java.io.File pomFile, java.util.List<ModelProblem> problems)Creates a new result with the specified contents.DefaultProjectBuildingResult(MavenProject project, java.util.List<ModelProblem> problems, DependencyResolutionResult dependencyResolutionResult)Creates a new result with the specified contents.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyResolutionResultgetDependencyResolutionResult()Gets the result of the dependency resolution for the project.java.io.FilegetPomFile()Gets the POM file from which the project was built.java.util.List<ModelProblem>getProblems()Gets the problems that were encountered during the project building.MavenProjectgetProject()Gets the project that was built.java.lang.StringgetProjectId()Gets the identifier of the project that could not be built.
-
-
-
Field Detail
-
projectId
private java.lang.String projectId
-
pomFile
private java.io.File pomFile
-
project
private MavenProject project
-
problems
private java.util.List<ModelProblem> problems
-
dependencyResolutionResult
private DependencyResolutionResult dependencyResolutionResult
-
-
Constructor Detail
-
DefaultProjectBuildingResult
DefaultProjectBuildingResult(MavenProject project, java.util.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(java.lang.String projectId, java.io.File pomFile, java.util.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 Detail
-
getProjectId
public java.lang.String getProjectId()
Description copied from interface:ProjectBuildingResultGets 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:
getProjectIdin interfaceProjectBuildingResult- Returns:
- The identifier of the project or an empty string if not known, never
null.
-
getPomFile
public java.io.File getPomFile()
Description copied from interface:ProjectBuildingResultGets the POM file from which the project was built.- Specified by:
getPomFilein interfaceProjectBuildingResult- Returns:
- The POM file or
nullif unknown.
-
getProject
public MavenProject getProject()
Description copied from interface:ProjectBuildingResultGets the project that was built.- Specified by:
getProjectin interfaceProjectBuildingResult- Returns:
- The project that was built or
nullif an error occurred and this result accompanies aProjectBuildingException.
-
getProblems
public java.util.List<ModelProblem> getProblems()
Description copied from interface:ProjectBuildingResultGets the problems that were encountered during the project building.- Specified by:
getProblemsin interfaceProjectBuildingResult- Returns:
- The problems that were encountered during the project building, can be empty but never
null.
-
getDependencyResolutionResult
public DependencyResolutionResult getDependencyResolutionResult()
Description copied from interface:ProjectBuildingResultGets the result of the dependency resolution for the project.- Specified by:
getDependencyResolutionResultin interfaceProjectBuildingResult- Returns:
- The result of the dependency resolution for the project or
nullif the project dependencies were not requested.
-
-