For the complete documentation index, see llms.txt. This page is also available as Markdown.

Editing Maven dependencies

Pin a sealed version in pom.xml, including dependencyManagement for transitive dependencies.

Direct dependencies

The Maven manifest is pom.xml. Update the <version> element of the dependency:

<dependency>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-text</artifactId>
  <version>1.10.0+sp1</version>
</dependency>

JVM ecosystems use + as the sealed-version separator instead of -. See Naming & versioning conventions for the full per-ecosystem suffix table.

Run mvn package (or whichever Maven goal your build uses) and the resolved artifact is the sealed version.

Transitive dependencies (<dependencyManagement>)

To force a transitive to a sealed version regardless of what your direct dependencies declare, use a <dependencyManagement> block in pom.xml. Maven resolves transitive versions against this block before falling back to the depending package's declaration:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.10.0+sp1</version>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencyManagement> only sets the version for inherited usage; it does not add a direct dependency by itself. The depending package still chooses whether to use commons-text, but if it does, the version comes from this block.

Last updated