Package org.apache.maven.api
Interface ProtoSession
- All Known Subinterfaces:
InternalMavenSession,InternalSession,Session
- All Known Implementing Classes:
AbstractSession,DefaultSession
The proto session, material used to create
Session.- Since:
- 4.0.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGets the root directory of the session, which is the root directory for the top directory project.Returns the start time of the session.Returns immutable system properties to use for interpolation.Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.Returns immutable user properties to use for interpolation.static ProtoSession.BuilderReturns new builder from scratch.default ProtoSession.BuilderReturns a proto session builder of this instance.
-
Method Details
-
getUserProperties
Returns immutable user properties to use for interpolation. The user properties have been configured directly by the user, e.g. via the-Dkey=valueparameter on the command line.- Returns:
- the user properties, never
null
-
getSystemProperties
Returns immutable system properties to use for interpolation. The system properties are collected from the runtime environment such asSystem.getProperties()and environment variables (prefixed withenv.).- Returns:
- the system properties, never
null
-
getStartTime
Returns the start time of the session.- Returns:
- the start time as an Instant object, never
null
-
getTopDirectory
Gets the directory of the topmost project being built, usually the current directory or the directory pointed at by the-f/--filecommand line argument.- Returns:
- the directory of the topmost project, never
null - See Also:
-
getRootDirectory
Gets the root directory of the session, which is the root directory for the top directory project.- Returns:
- the root directory, never
null - Throws:
IllegalStateException- if the root directory could not be found- See Also:
-
toBuilder
Returns a proto session builder of this instance. -
newBuilder
Returns new builder from scratch.
-