| Ecosystem | Enable with | Read from |
|---|---|---|
| Maven | default | elide.pkl, or a pom.xml project selected with -p |
| npm | --ecosystems=npm | elide.pkl and package.json |
| PyPI | — | dependencies.pypi is accepted; elide install does not install it |
Install dependencies
elide install # Maven
elide install --ecosystems=npm # npm
elide install --ecosystems=maven,npm # both
elide install --workspace # every ecosystem the project declares
A package.json does not enable npm by itself; name every ecosystem CI needs. An unknown or unavailable ecosystem
is a usage error.
Declare dependencies
amends "elide:project.pkl"
dependencies {
maven {
packages {
"com.google.guava:guava:33.4.8-jre"
}
}
npm {
packages { "react@19.0.0" }
devPackages { "typescript@5.6.2" }
}
pypi {
packages { "requests>=2" }
optionalPackages { ["dev"] { "pytest>=8" } }
}
}npm also reads package.json. A pom.xml-only project: elide install -p .; see
Maven Dependencies.
Maven buckets
An entry is group:artifact:version[:classifier], a MavenPackageSpec, a local JAR path, or a project("name")
reference. Workspace members can omit the version and take the root’s
(Workspaces). Conflicts resolve nearest-first, as in Maven.
| Bucket | Applies to |
|---|---|
packages | Compile and runtime classpaths of production sets. |
devPackages | Development time only. |
modules | --module-path for compiles, runs, tests and native images. |
compileOnly | Compile classpath only. |
runtimeOnly | Runtime classpath only. |
processors | Annotation-processor path; see Maven Dependencies. |
testPackages | Test sets, in addition to their production set’s dependencies. |
kotlinPlugins | Kotlin compiler plugins; see Kotlin Compiler. |
exclusions | Removed from resolution and every classpath. |
substitutions | Local files replacing a coordinate on every classpath; see reference. |
Spring Boot starters:
dependencies {
spring {
version = "4.0.0"
starter { "web"; "actuator" }
testStarter { "test" }
}
}Each name becomes org.springframework.boot:spring-boot-starter-<name>:<version> in packages or testPackages.
Other Spring artifacts (spring-boot-devtools, org.springframework:*) go in maven; the two merge.
Repositories
dependencies {
maven {
repositories {
["company"] = "https://maven.example.com/releases"
["private"] {
url = "https://packages.example.com/maven"
credentials {
username = read("env:MAVEN_USER")
password = read("env:MAVEN_TOKEN")
}
}
}
localRepository = ".m2/repository"
}
}| Property | Meaning |
|---|---|
repositories[name].url | Repository URL. |
repositories[name].credentials.username, .password | Basic authentication. |
repositories[name].credentials.ntlmDomain, .ntlmWorkstation | Either one selects NTLM. |
repositories[name].name, .description | Display name and description. |
enableDefaultRepositories | Include Maven Central (default true). |
localRepository | Local Maven repository to resolve into. |
- Plain
http://to anything but127.0.0.0/8fails withMaven repository 'name' uses plain HTTP.elide build deps --allow-http-repositoriesaccepts it. read("env:…")needs--allow-env; see Build Flags.- Public artifacts are fetched through the pkg.st proxy;
elide build deps --use-pkgst=false(or--no-use-pkgst) fetches them directly.
Maven options
| Option | Effect |
|---|---|
--slim | Skip sources and Javadoc. |
--with=sources | Also fetch sources; javadoc and docs work too. Unknown values exit 2. |
--direct | Copy artifacts into the project instead of linking. |
--fresh | Ignore cached resolution. |
elide build deps runs the same resolution as a task and also takes --offline, --allow-http-repositories and
--use-pkgst.
Installed files
| Path | Contents |
|---|---|
.dev/dependencies/npm/node_modules | npm packages; node_modules at the project root links here. |
aube-lock.yaml | npm lockfile. |
.dev/dependencies/m2 | Links into the standard Maven cache. |
.dev/dependencies/m2/{compile,runtime,test,processors}.classpath | Resolved classpaths; see elide classpath. |
In a workspace, links are in the root’s .dev/dependencies/; classpath files stay per project. There is no
cross-ecosystem lockfile; see Build state.
Implicit JVM libraries
- Java-only roots get no implicit Kotlin libraries, Metro runtime or Elide annotation API, even with a
kotlinblock. - Kotlin roots get the libraries their
kotlin.featuresenable. - Test sets get bundled JUnit while
jvm.features.testingistrue.
To use Elide annotations from Java:
dependencies {
maven {
compileOnly { "dev.elide:elide-api:latest" }
}
}npm specifics: NPM Installer.