Build automation and dependency management for Moose models. Nexus provides dependency analysis and management similar to Maven and Gradle when building models. It also provides structured and versioned tracking of models.
Metacello new
githubUser: 'moosetechnology' project: 'MooseNexus' commitish: 'main' path: 'src';
baseline: 'MooseNexus';
loadTo import and analyze managed projects, you will need to install the appropriate build tools, Maven and Gradle.
To create new models, you will need to install the appropriate model extractor, such as VerveineJ locally or through VerveineJ-Docker.
Currently, MooseNexus only works with Java source projects. The supported source project natures, based on build automation tool, are Maven and Gradle. Dependency management support for unmanaged source projects is planned.
Import a new project into the Nexus repository:
sourcePath := 'path/to/sources'.
coordinates := MooseNexusProjectCoordinates
group: 'group'
name: 'name'
version: 'version'.
spec := MooseNexusProjectSpec
coordinates: coordinates
sourceDirectory: sourcePath.
project := MooseNexusRepository default
record: spec.The project spec describes the source directory and coordinates before repository recording starts. The recorded MooseNexus project then represents the loaded project stored in the repository.
Retrieve an existing project from a Nexus repository:
project := MooseNexusRepository default group: 'group' project: 'name' version: 'version'.Create a model of the managed project:
project buildModel.Import a model into the image:
project importModel.MooseNexus sits one meta layer above source code: it does not build the software itself, it builds Moose models of that software. To avoid ambiguity, these terms are used consistently in code and documentation:
- Source project: The software project being analyzed. This is the codebase that may already be built by Maven, Gradle, or another build tool.
- MooseNexus project: The MooseNexus representation of a source project as a model-building unit. It records the source project identity, nature, dependencies, and produced models.
- Project spec: The recording intent for a MooseNexus project before it exists in a repository. It contains the selected project coordinates and source directory.
- Project coordinates: The stable identity of a MooseNexus project, composed of group, name, and version. These coordinates identify the source project as modeled by MooseNexus, not necessarily a published software package.
- Repository: A MooseNexus storage location for MooseNexus projects and produced model artifacts. The current implementation is a local filesystem repository.
- Model: A Moose/Famix representation of a source project, or of a selected set of source projects and dependencies.
- Model artifact: A stored output of a MooseNexus build. It contains, or points to, a generated model and should carry enough metadata to identify how it was produced.
- Dependency: Another source project or software artifact required to analyze or model a source project. Dependencies may come from Maven, Gradle, local repositories, or future MooseNexus repositories.
- Dependency scope: The context in which a dependency is used by the source project, such as compile, runtime, or test. MooseNexus may use scopes to decide which dependencies are included in a model.
- Nature: The kind of source project MooseNexus knows how to inspect, usually derived from the source project's build tool. Maven and Gradle are the currently supported natures.
- Extractor: A tool that creates a Moose/Famix model from source code. For Java, MooseNexus currently uses VerveineJ.
- Build: A MooseNexus operation that resolves source project metadata and dependencies, runs an extractor, and records the resulting model artifact.
- Managed source project: A source project whose metadata and dependencies can be read from an existing build tool such as Maven or Gradle.
- Unmanaged source project: A source project without a supported build tool descriptor. Support for unmanaged source projects is planned.