# Packages

> Everything a build uses is a package, pinned by your version group, from your own releases to the JDK and the build system.

**Everything a build uses is a package: your released projects, the libraries you import, the toolchains and the build systems. Nothing comes from the machine.**

Named: in UpperCamelCase, without a group or a scope: `Guava`, `KotlinStdLib`
Pinned by: your version group, one exact version each
Owned by: your organization, or plinto's catalog

## Four kinds, one way {#kinds}

| Kind | For example | Where it comes from |
|---|---|---|
| Your releases | `MyLib`, `MyService` | your projects, released by a build |
| Libraries | `Guava`, `XText`, `Serde`, `FastApi` | an import from Maven Central, Go modules, crates.io, npm, PyPI or Hex |
| Toolchains | `Java`, `Go`, `Rust`, `Node`, `Python`, `Gcc` | an import of the vendor's builds, for every platform |
| Build systems | `JavaBuild`, `GoBuild`, `Archive` | plinto's catalog: see [Build systems](build-systems.md) |

They are all declared the same way, released the same way and pinned the same way. That's why the JDK can't differ between your laptop and production: it is `Java = 25`, as fixed as any library.

## Names {#names}

A package's name has no group or scope: `com.google.guava:guava` is `Guava`, `golang.org/x/text` is `XText`, `serde_json` is `SerdeJson` and `@types/node` is `TypesNode`. An import names them for you; `--name` gives one a name of your own.

Your organization's packages come first: plinto's catalog provides the build systems and toolchains, and your own package with a catalog name replaces the catalog's for you. See [Replace a catalog package](../guides/replace-a-catalog-package.md).

## Imports {#imports}

An open-source library comes in once per group, with everything it needs, and is then pinned like your own code:

```sh
$ plinto import maven com.google.guava:guava:33.7.2-jre
Importing com.google.guava:guava 33.7.2-jre:
  FailureAccess  1.0.3       new          com.google.guava:failureaccess
  Guava          33.7.2-jre  new version  com.google.guava:guava
```

The import is a build of your group: it releases each package and makes a new revision. Then each project names what it uses:

```conf
dependencies: {
  Guava = 33.7.2-jre
}
```

| Ecosystem | Command |
|---|---|
| Maven Central | `plinto import maven <group>:<artifact>:<version>` |
| Go modules | `plinto import go <module path>@<version>` |
| crates.io | `plinto import crate <name>@<version> [--features a,b]` |
| npm | `plinto import npm <package>@<version>` |
| PyPI | `plinto import pypi <project>==<version>` |
| Hex | `plinto import hex <package>==<version>` |
| Toolchains | `plinto import jdk 25.0.4.10.1`, and `go-toolchain`, `rust-toolchain`, `node-toolchain`, `python-toolchain`… |

- `--dry-run` shows what it would bring, and changes nothing.
- It goes into `main` unless `--version-group` names another group.
- Anyone in your organization can import.
- A group holds several versions of a Maven artifact, an npm package or a toolchain, and one of a Go module, a crate, a PyPI project or a Hex package.

Nothing is downloaded from those registries during a build: a build only ever takes packages.

### Platforms {#platforms}

A toolchain is imported for plinto's five platforms, `linux-x64`, `linux-aarch64`, `mac-x64`, `mac-aarch64` and `windows-x64`, each one its vendor builds for; `--platforms` names fewer. Maven artifacts and Go modules run anywhere, and crates, npm and PyPI packages come with what each of the five needs.

An ARM64 server needs the `linux-aarch64` build of what its archive carries: the JDK, Node.js or Python your service runs on, and the tools a [custom build's service](../languages/custom.md#service) carries, such as Caddy. A version imported for fewer platforms takes one more when you import it again with `--platforms`, released as its next build:

```sh
$ plinto import jdk 25.0.4.10.1 --platforms linux-x64,linux-aarch64
```

Your own Go programs are built for more platforms with [`platforms`](../languages/go.md#settings) in `configuration/GoBuild.config`.

- [Version groups](version-groups.md): what pins each package
- [Build systems](build-systems.md): the packages that build
- [Command line: import](../reference/cli/import.md): every option
