Anvil
How-to guides

Anvil: declare the dependency

Add Anvil to a resource's build with the two zip coordinates and the install step.

A resource that calls Anvil declares it on Forge's catiaMagic configuration, once per zip, and installs both archives into the tool before it compiles. This page shows the declaration, what the classifier must say and what the install step does to the build.

Declare the two zips

Anvil publishes two zip coordinates, one for the Resource and one for the Plugin, each carrying a classifier tracking the CATIA Magic version they were built against:

dependencies {
    catiaMagic("com.mbseconsulting.resources:anvil:<version>:2026x-refresh1@zip")
    catiaMagic("com.mbseconsulting.plugins:anvil:<version>:2026x-refresh1@zip")
}
./gradlew installCatiaMagicDependencies

The classifier is derived from com.mbseconsulting.forge.resource.mdVersionMin, so it follows the release rather than a naming choice. A consumer that omits it, or that names 2026x where Anvil was published as 2026x-refresh1, resolves nothing.

What the install step does

installCatiaMagicDependencies installs both archives into the tool. The compile-time classpath then comes from those installed jars as compileOnly, the same way SysML and the Open API do, rather than from a Maven implementation dependency, so a consumer that skips the install step fails at compile time, and one that lacks the install on a running machine fails at runtime instead.

Generated profile bindings

The generator that emits bindings against profile.runtime lives in Forge, which runs it from its generateProfileBindings task during a consuming project's build. A consumer therefore declares Anvil as above, once per zip, and the Forge version selects the generator. Emitted code carries @Generated, which keeps generated bindings out of that consumer's coverage report and coverage gate.

profile.runtime is a published contract two repositories deep: a signature change in Anvil breaks the sources Forge emits into every consumer. The profile-binding contract states the rules, and Anvil: use profile bindings shows the API from a caller's side.

On this page