# Installation

To use Inrupt’s Java client library, add the **`inrupt-client-bom`** and specific library modules to your [Maven](https://maven.apache.org/) or [Gradle](https://gradle.org/) project.

### 1. Add **`inrupt-client-bom`**

{% tabs %}
{% tab title="Maven" %}
To your project’s **`pom.xml`**:

1. Add the **`inrupt-client-bom`** dependency in the project’s **`<dependencyManagement>`** section.
2. Replace **`SUBSTITUTE_VERSION`** with the version to use.

<pre class="language-java"><code class="lang-java">&#x3C;dependencyManagement>
   &#x3C;dependencies>
      &#x3C;dependency>
         &#x3C;groupId>com.inrupt.client&#x3C;/groupId>
         &#x3C;artifactId>inrupt-client-bom&#x3C;/artifactId>
<strong>         &#x3C;version>SUBSTITUTE_VERSION&#x3C;/version>
</strong>         &#x3C;type>pom&#x3C;/type>
         &#x3C;scope>import&#x3C;/scope>
      &#x3C;/dependency>
   &#x3C;/dependencies>
&#x3C;/dependencyManagement>
</code></pre>

For the latest version of **`inrupt-client-bom`**,

1. Go to [Maven Central](https://central.sonatype.com/search).
2. Search for **`inrupt-client-bom`**. Get the version for the package with **`com.inrupt.client`** namespace.
   {% endtab %}

{% tab title="Gradle (Groovy)" %}
To your project’s build script `build.gradle`:

1. Add the `inrupt-client-bom` platform dependency.
2. Replace `SUBSTITUTE_VERSION` with the version to use.

<pre class="language-java"><code class="lang-java">dependencies {
<strong>    implementation platform("com.inrupt.client:inrupt-client-bom:SUBSTITUTE_VERSION")
</strong>}
</code></pre>

For the latest version of `inrupt-client-bom`,

1. Go to [Maven Central](https://central.sonatype.com/search).
2. Search for `inrupt-client-bom`. Get the version for the package with `com.inrupt.client` namespace.
   {% endtab %}

{% tab title="Gradle (Kotlin)" %}
To your project’s build script `build.gradle.kts`:

1. Add the `inrupt-client-bom` platform dependency.
2. Replace `SUBSTITUTE_VERSION` with the version to use.

<pre class="language-java"><code class="lang-java">dependencies {
    //... additional dependencies
<strong>    implementation(platform("com.inrupt.client:inrupt-client-bom:SUBSTITUTE_VERSION"))
</strong>}
</code></pre>

For the latest version of `inrupt-client-bom`,

1. Go to [Maven Central](https://central.sonatype.com/search).
2. Search for `inrupt-client-bom`. Get the version for the package with `com.inrupt.client` namespace.
   {% endtab %}
   {% endtabs %}

### 2. Add Specific Module Dependencies

{% tabs %}
{% tab title="Maven" %}
To your project’s **`pom.xml`** file, you can either:

* Add the **`inrupt-client-runtime`** to include all recommended Java Client Libraries runtime modules; or
* Add specific Java Client Libraries modules.

{% tabs %}
{% tab title="inrupt-client-runtime" %}
To include all recommended runtime modules from the Java Client Libraries, add the following dependency to the **`<dependencies>`** section in your project’s **`pom.xml`** file.

The recommended modules include those modules used to:

* Access your WebID,
* Perform read and write operations (both RDF and non-RDF resources) on your Pod,
* For the read of RDF resources, return the RDF resources in Turtle and JSON, and
* Use access requests and access grants.

```java
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-runtime</artifactId>
</dependency>
```

{% endtab %}

{% tab title="Specific Modules" %}
To your project’s `pom.xml` file, add the specific library modules in your project `<dependencies>` section. The following example includes the modules used to:

* Access your WebID
* Perform read and write operations (both RDF and non-RDF resources) on your Pod, and
* For the read of RDF resources, return the RDF resources in Turtle and JSON, and
* Use access requests and access grants.

```java
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-api</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-solid</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-core</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-okhttp</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-jackson</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-jena</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-openid</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-accessgrant</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-uma</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-vocabulary</artifactId>
</dependency>
<dependency>
    <groupId>com.inrupt.client</groupId>
    <artifactId>inrupt-client-webid</artifactId>
</dependency>
```

{% endtab %}
{% endtabs %}

Inrupt’s Java Client Libraries are composed of different modules. See [Library Modules](/sdk/java-sdk.md#library-modules) for the list of available modules and their description.
{% endtab %}

{% tab title="Gradle (Groovy)" %}
To your project’s build script `build.gradle`, add the specific library modules as module dependencies. The following example includes the modules used to:

* Access your WebID,
* Perform read and write operations (both RDF and non-RDF resources) on your Pod, and
* For the read of RDF resources, return the RDF resources in Turtle and JSON, and
* Use Access Requests and Access Grants.

<pre class="language-java"><code class="lang-java">dependencies {
    implementation platform("com.inrupt.client:inrupt-client-bom:SUBSTITUTE_VERSION")
<strong>    implementation "com.inrupt.client:inrupt-client-api"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-solid"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-core"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-okhttp"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-jackson"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-jena"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-accessgrant"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-openid"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-uma"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-vocabulary"
</strong><strong>    implementation "com.inrupt.client:inrupt-client-webid"
</strong>}
</code></pre>

Inrupt’s Java Client Libraries are composed of different modules. See [Library Modules](/sdk/java-sdk.md#library-modules) for the list of available modules and their description.
{% endtab %}

{% tab title="Gradle (Kotlin)" %}
To your project’s build script `build.gradle.kts`, add the specific library modules as module dependencies. The following example includes the modules used to:

* Add the `inrupt-client-runtime` to include all recommended Java Client Libraries runtime modules; or
* Add specific Java Client Libraries modules.

{% tabs %}
{% tab title="inrupt-client-runtime" %}
To include all recommended runtime modules from the Java Client Libraries, add the following `inrupt-client-runtime` dependency. The recommended modules include those modules used to:

* Access your WebID,
* Perform read and write operations (both RDF and non-RDF resources) on your Pod,
* For the read of RDF resources, return the RDF resources in Turtle and JSON, and
* Use Access Requests and Access Grants.

<pre class="language-java"><code class="lang-java">dependencies {
    //... additional dependencies
    implementation(platform("com.inrupt.client:inrupt-client-bom:SUBSTITUTE_VERSION"))
<strong>    implementation("com.inrupt.client:inrupt-client-runtime")
</strong>}
</code></pre>

{% endtab %}

{% tab title="Specific Modules" %}
You can add specific library modules. The following example includes the modules used to:

* Access your WebID,
* Perform read and write operations (both RDF and non-RDF resources) on your Pod,
* For the read of RDF resources, return the RDF resources in Turtle and JSON, and
* Use Access Requests and Access Grants.

<pre class="language-java"><code class="lang-java">dependencies {
    //... additional dependencies
    implementation(platform("com.inrupt.client:inrupt-client-bom:SUBSTITUTE_VERSION"))
<strong>    implementation("com.inrupt.client:inrupt-client-api")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-solid")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-core")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-okhttp")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-jackson")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-jena")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-accessgrant")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-openid")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-uma")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-vocabulary")
</strong><strong>    implementation("com.inrupt.client:inrupt-client-webid")
</strong>}
</code></pre>

{% endtab %}
{% endtabs %}

Inrupt’s Java Client Libraries are composed of different modules. See [Library Modules](/sdk/java-sdk.md#library-modules) for the list of available modules and their description.
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inrupt.com/sdk/java-sdk/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
