Package org.apache.maven.internal.impl
Class DefaultProject
java.lang.Object
org.apache.maven.internal.impl.DefaultProject
- All Implemented Interfaces:
Project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetModel()
Returns the path to the pom file for this project.Gets the root directory of the project, which is the parent directory containing the.mvn
directory or flagged withroot="true"
.boolean
boolean
Returns a boolean indicating if the project is a root project, meaning that theProject.getRootDirectory()
andProject.getBasedir()
points to the same directory, and that eitherModel.isRoot()
istrue
or thatbasedir
contains a.mvn
child directory.boolean
Returns a boolean indicating if the project is the top level project for this reactor build.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.api.Project
getBasedir, getBuild, getId
-
Constructor Details
-
DefaultProject
-
-
Method Details
-
getSession
-
getProject
-
getGroupId
- Specified by:
getGroupId
in interfaceProject
-
getArtifactId
- Specified by:
getArtifactId
in interfaceProject
-
getVersion
- Specified by:
getVersion
in interfaceProject
-
getArtifact
- Specified by:
getArtifact
in interfaceProject
-
getPackaging
- Specified by:
getPackaging
in interfaceProject
-
getModel
-
getPomPath
Description copied from interface:Project
Returns the path to the pom file for this project. A project is usually read from the file system and this will point to the file. In some cases, a transient project can be created which will not point to an actual pom file.- Specified by:
getPomPath
in interfaceProject
- Returns:
- the path of the pom
-
getDependencies
- Specified by:
getDependencies
in interfaceProject
-
getManagedDependencies
- Specified by:
getManagedDependencies
in interfaceProject
-
isExecutionRoot
public boolean isExecutionRoot()- Specified by:
isExecutionRoot
in interfaceProject
-
isTopProject
public boolean isTopProject()Description copied from interface:Project
Returns a boolean indicating if the project is the top level project for this reactor build. The top level project may be different from therootDirectory
, especially if a subtree of the project is being built, either because Maven has been launched in a subdirectory or using a-f
option.- Specified by:
isTopProject
in interfaceProject
- Returns:
true
if the project is the top level project for this build
-
isRootProject
public boolean isRootProject()Description copied from interface:Project
Returns a boolean indicating if the project is a root project, meaning that theProject.getRootDirectory()
andProject.getBasedir()
points to the same directory, and that eitherModel.isRoot()
istrue
or thatbasedir
contains a.mvn
child directory.- Specified by:
isRootProject
in interfaceProject
- Returns:
true
if the project is the root project- See Also:
-
getRootDirectory
Description copied from interface:Project
Gets the root directory of the project, which is the parent directory containing the.mvn
directory or flagged withroot="true"
.- Specified by:
getRootDirectory
in interfaceProject
- See Also:
-
getParent
-
getRemoteProjectRepositories
- Specified by:
getRemoteProjectRepositories
in interfaceProject
-
getRemotePluginRepositories
- Specified by:
getRemotePluginRepositories
in interfaceProject
-