Open plinto
Docs›Guides

Replace a catalog package with your own

Guide·5 min read

plinto's catalog gives every organization its build systems, toolchains and common libraries. A package of yours with a catalog name replaces the catalog's for you: it shadows the catalog's in your version groups, while every other organization keeps reading the catalog's. Your projects name it as they did, so no plinto.conf changes.

Replace, or add versions

What a package of yours does to the catalog's depends on where it comes from:

Your package of a catalog name What your groups see
A new package, a linked repository, uploaded files, or an import of something else yours alone: it replaces the catalog's
An import of the same library the catalog imported, at another version the catalog's versions and yours: it adds versions, see below

1. Make your package

In the Code app, New package, with the catalog's name spelled as the catalog spells it: Archive, not archive. Another spelling is refused, as it would be a second package beside the catalog's:

the catalog's package is Archive: a package of the name is spelled so

An import of something else takes a catalog name only when you name it so, with --name, or by typing the name in the package's row of the plan in the Code app's Import:

$ plinto import maven com.example:archive:2.0 --name com.example:archive=Archive

Without it, the import is refused, so nothing replaces a catalog package by chance:

these are the catalog's packages, from elsewhere than this import's: name them otherwise, or by those names to replace the catalog's in this organization
  Archive 2.0: the catalog's Archive is no import

2. Release it

Build it into your group like any package. Its first release is numbered above the catalog's: if the catalog has Archive 1.0-10, yours starts at 1.0-11. The build that releases it pins it in the group, so from that revision on, your projects build with yours.

A version the catalog has is never yours: uploading files as one of the catalog's versions is refused.

3. What changes

4. Go back to the catalog's

When the catalog has what you needed, open your package in the Code app and choose Use the catalog's again…. Your groups take whatever is latest in the catalog's main with their next merge of it:

JavaConfiguration goes back to the catalog's: its own 1.0-2 → 1.0-3

You and the catalog each number your own builds, so the catalog may have released a 1.0-2 while yours had one too. Your groups then name the catalog's as 1.0-2@plinto, and plain 1.0-2 stays yours, so what an old revision pinned never changes. The apps show either one as 1.0 and the commit it was built from; a revision's page shows the whole version, 1.0-2@plinto.

When an import adds versions

An import of the library the catalog imported, from the same place, doesn't replace it: your versions join the catalog's. A library built with an older Kotlin brings KotlinStdLib 2.3.0 of yours, and your groups read it beside the catalog's newer ones. A version the catalog already has is pinned from the catalog, never copied.

In the Groups app, a package that mixes the two says yours or catalog beside each version.

Not yet