Dependencies

Declare and install Maven, npm and PyPI dependencies.

EcosystemEnable withRead from
Mavendefaultelide.pkl, or a pom.xml project selected with -p
npm--ecosystems=npmelide.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
Installing Maven and npm dependencies explicitly with Elide

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.

BucketApplies to
packagesCompile and runtime classpaths of production sets.
devPackagesDevelopment time only.
modules--module-path for compiles, runs, tests and native images.
compileOnlyCompile classpath only.
runtimeOnlyRuntime classpath only.
processorsAnnotation-processor path; see Maven Dependencies.
testPackagesTest sets, in addition to their production set’s dependencies.
kotlinPluginsKotlin compiler plugins; see Kotlin Compiler.
exclusionsRemoved from resolution and every classpath.
substitutionsLocal 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"
  }
}
PropertyMeaning
repositories[name].urlRepository URL.
repositories[name].credentials.username, .passwordBasic authentication.
repositories[name].credentials.ntlmDomain, .ntlmWorkstationEither one selects NTLM.
repositories[name].name, .descriptionDisplay name and description.
enableDefaultRepositoriesInclude Maven Central (default true).
localRepositoryLocal Maven repository to resolve into.
  • Plain http:// to anything but 127.0.0.0/8 fails with Maven repository 'name' uses plain HTTP. elide build deps --allow-http-repositories accepts 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

OptionEffect
--slimSkip sources and Javadoc.
--with=sourcesAlso fetch sources; javadoc and docs work too. Unknown values exit 2.
--directCopy artifacts into the project instead of linking.
--freshIgnore cached resolution.

elide build deps runs the same resolution as a task and also takes --offline, --allow-http-repositories and --use-pkgst.

Installed files

PathContents
.dev/dependencies/npm/node_modulesnpm packages; node_modules at the project root links here.
aube-lock.yamlnpm lockfile.
.dev/dependencies/m2Links into the standard Maven cache.
.dev/dependencies/m2/{compile,runtime,test,processors}.classpathResolved 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 kotlin block.
  • Kotlin roots get the libraries their kotlin.features enable.
  • Test sets get bundled JUnit while jvm.features.testing is true.

To use Elide annotations from Java:

dependencies {
  maven {
    compileOnly { "dev.elide:elide-api:latest" }
  }
}

npm specifics: NPM Installer.