djl

DJL - Bill of Materials (BOM)

BOM stands for Bill Of Materials. Maven lets us define the versions of the dependencies or transitive dependencies in a separate POM. A BOM package is a POM only jar file that is used to control the versions of a project’s dependencies and provide a central place to define and update those versions. See Maven document about how BOM works.

DJL’s BOM package provides a flexibility way for developers to add DJL dependencies to their project without worrying about each modules’ version that we should depend on.

How to use DJL’s BOM

Use BOM in Maven

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>bom</artifactId>
            <version>0.27.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>bom</artifactId>
            <version>0.27.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>ai.djl</groupId>
        <artifactId>api</artifactId>
    </dependency>
    <dependency>
        <groupId>ai.djl.mxnet</groupId>
        <artifactId>mxnet-engine</artifactId>
    </dependency>
    <dependency>
        <groupId>ai.djl.mxnet</groupId>
        <artifactId>mxnet-engine</artifactId>
    </dependency>
</dependencies>

Use BOM in Gradle

    implementation platform("ai.djl:bom:0.27.0")
    implementation "ai.djl.pytorch:pytorch-model-zoo" // No version required