Package org.apache.maven.api.services
Interface ModelTransformerContext
public interface ModelTransformerContext
Context used to transform a pom file.
- Since:
- 4.0.0
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRawModel
(Path from, String groupId, String artifactId) Get the model from the reactor based on the groupId and artifactId when resolving reactor dependencies.getRawModel
(Path from, Path pomFile) Get the model based on the path when resolving the parent based on relativePath.getUserProperty
(String key) Get the value of the Maven user property.Locate the POM file inside the given directory.
-
Field Details
-
KEY
Key to get the TransformerContext from the SessionData
-
-
Method Details
-
getUserProperty
Get the value of the Maven user property. -
getRawModel
Get the model based on the path when resolving the parent based on relativePath.- Parameters:
from
- the requiring modelpomFile
- the path to the pomFile- Returns:
- the model, otherwise
null
-
getRawModel
Get the model from the reactor based on the groupId and artifactId when resolving reactor dependencies.- Parameters:
from
- the requiring modelgroupId
- the groupIdartifactId
- the artifactId- Returns:
- the model, otherwise
null
- Throws:
IllegalStateException
- if multiple versions of the same GA are part of the reactor
-
locate
Locate the POM file inside the given directory.
-