6 releases

Uses new Rust 2024

new 0.9.3 Mar 28, 2026
0.9.2 Mar 21, 2026
0.9.0 Feb 23, 2026
0.8.0 Feb 23, 2026
0.7.1 Feb 22, 2026

#3 in #dependency-management


Used in 2 crates

MIT license

335KB
7K SLoC

deps-maven

Crates.io docs.rs CI codecov License: MIT

pom.xml support for deps-lsp.

This crate is part of the deps-lsp workspace. It provides Maven/JVM ecosystem support including pom.xml parsing, dependency extraction, and Maven Central registry integration, and implements deps_core::Ecosystem.

Features

  • XML parsing — Parse pom.xml with byte-accurate position tracking via the quick-xml SAX reader
  • Dependency sections — Handle <dependencies>, <dependencyManagement>, and <build><plugins> blocks
  • Maven Central registry — Solr API client for version lookups and artifact search
  • Version comparison — Maven version qualifier support (alpha, beta, RC, SNAPSHOT, GA)
  • Property resolution — Resolve ${property} placeholders defined in <properties>
  • Scope handling — Recognise compile, test, provided, runtime, and import scopes

Installation

[dependencies]
deps-maven = "0.9.3"

[!IMPORTANT] Requires Rust 1.89 or later.

Usage

use deps_maven::{parse_pom_xml, MavenCentralRegistry};

let result = parse_pom_xml(content, &uri)?;
let registry = MavenCentralRegistry::new(cache);
let versions = registry.get_versions_typed("org.springframework:spring-core").await?;

Supported pom.xml syntax

<project>
  <properties>
    <spring.version>6.1.0</spring.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>6.1.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>3.2.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.12.1</version>
      </plugin>
    </plugins>
  </build>
</project>

License

MIT

Dependencies

~14–23MB
~324K SLoC