Skip to end of metadata
Go to start of metadata


Major Components 

Maven Shared Model - A general component used both for inheritance and for imports (mixins) of generic data models. These generic models may be XML based, flat properties or any other structure. The framework uses a concept of linearlized inheritance that creates a linear chain of models and then collapses the structure, filling in slots of data. The framework allows applications to insert additional models into the inheritance chain that may not be the natural ancestor(s) of a model. The framework uses IoC to delegate certain actions to specialized extensions, such as model transforms to and from the shared canonical data format.

Maven Project Extensions - A specialized component that extends the maven shared model to handle the Maven pom model. This component handles processing of maven specific inheritance rules such as not allowing inheritance of modules, build resources, etc. The extensions also handle processing of dependency and plugin management.

Major Classes

Maven Shared Model Classes

ModelTransformerContext -  provides methods for doing transforms. You pass in lists of domain models and transformers (these are project specific extensions) and you get back a collapsed domain model, with inheritance and imports merged in.

ModelContainer - provides services for determining actions to take on a set of model properties: no operation, delete or join.

ModelDataSource -  provides methods for joining, deleting and querying of model containers. This data source contains the model and is the recommended way to manipulate the model.

ModelTransformer - implementations of this class handle transforms from the domain models to the canonical data format and from the canonical data format to a domain model.

The ModelTransformerContext is the main class within the package. It takes the domain model and :0) transforms model into canonical data format using the ModelTransformers (PomClassicTransformer), 1) collapses model, 2) asks the ModelContainers (ArtifactModelContainer,IdModelContainer) what actions it should take on the model; 3) uses ModelDataSource to execute the ModelContainer actions on the model. 4) transforms back from canonical data format to the domain model using ModelTransformer; 5) returns processed domain model.

Maven Project Classes

ProjectBuilder - main class in the package. Provides services for building maven projects from pom models. Meant as eventual replacement for DefaultMavenProjectBuilder. This class instantiates the ModelTransformerContext and provides a bridge to the maven shared model component.

PomClassicTransformer - implementation of ModelTransformer. Provides bidirectional transforms between pom model and canonical data model. This class is used by the ModelTransformerContext to get the canonical data that it then operates on. This class also does specialized maven specific rules such as dependency and plugin management.

ArtifactModelContainerFactory - this class provides an implementation of (Artifact)ModelContainer. Certain URIs (the canonical data format) are associated with this factory. When the ModelTransformerContext encounters a URI, it sees if there is a model container factory associated with it. Thus the ArtifactModelContainerFactory provides a method for obtaining URIs that it supports. The ModelTransformerContext uses this factory to create a ModelContainer and asks the container what action (join, delete) it should perform on the model.


  • No labels