The dependency model
The three kinds of dependency a resource declares, and why Dassault ships no resolver.
A CATIA Magic resource can depend on other resources, and installing one in the wrong order breaks it. This page explains the three kinds of dependency, the gap Dassault leaves, and how Forge fills it.
Three kinds of dependency
Reading the two descriptors shows three distinct dependency axes.
A resource may require another resource. The example resource requires
Product Line Engineering 2024x Refresh2. When the descriptor carries the matching node, CATIA
Magic warns the user before installation. The user may install regardless, and may then lose
functionality.
A plugin may require another plugin. The example plugin requires SysML 2024x Refresh2. Again
CATIA Magic warns and allows the installation to proceed, but a plugin whose required plugin is
absent stays disabled.
A plugin may require external libraries, ordinary jars such as Jackson. Those jars are injected into the CATIA Magic classpath, and a missing one costs functionality at runtime.
Installing a resource therefore means analysing what it requires, installing that first, and only then installing the resource itself.
The gap
Dassault Systèmes provides no dependency resolution mechanism, and no repository — Nexus, Artifactory or otherwise — holding resources and plugins. The descriptors can declare a dependency, and the tool can warn about it, but nothing resolves one.
The gap hurts in two phases:
- Development. Building a resource that depends on others requires a CATIA Magic installation with those resources and plugins already installed, or the code neither compiles nor runs.
- Packaging. Releasing a resource requires the correct metadata in each descriptor, written by hand and kept in step with reality.
What Forge adds
Forge treats resources and plugins as Maven artifacts, which brings Gradle's resolver to a problem that previously had none. A team publishes every resource and plugin — its own and Dassault's — into a Maven repository, and each project then declares what it needs:
dependencies {
catiaMagic("com.3ds.resources:product-line-engineering:2024.3.0")
catiaMagic("com.3ds.plugins:sysml:2024.3.0")
}Those declarations serve both phases at once. installCatiaMagicDependencies installs the named
resources and plugins into the local CATIA Magic, transitively, in one command, because Gradle
already knows how to resolve a dependency graph. The same declarations populate the
requiredResource and required-plugin nodes of the generated descriptors, so the packaged
metadata cannot drift from what the project actually builds against.
The two configurations
Forge creates two Gradle configurations, and the distinction between them matters.
catiaMagic holds what a project additionally wants: resources and plugins the author declares.
It resolves ZIP artifacts, forces every dependency transitive, and sets its cache lifetime to zero
so a changing or dynamic version always refreshes.
catiaMagicInstallation holds what came with the tool. Forge populates it automatically
from the manifest.json of a downloaded installation, which makes reinstalling exactly what the
tool shipped a single command.
See Declare dependencies for the practical steps, and Publish raw assets for seeding the repository in the first place.