# Maven

### How open-source Maven Artifacts are downloaded

Developers who want to install your OSS package through Maven will typically execute a command like this:

```python
mvn dependency:get -Dartifact=YourSoftware:version1
```

When this command is executed, the developer's system will download the Maven artifact of your software hosted on Maven Central.

Since Maven Central is maintained by Sonatype, you will normally get only limited, aggregated analytics of downloads of your Maven artifact → such as aggregate counts of artifact downloads, origin countries of download requests, aggregation of cloud services initiating a download and domain classification (business, ISP, education) etc.

You will not get download-specific information, or the ability to de-anonymize Maven downloads at user or organization level.

This level of detail isn't useful to GTM motions as it does not identify the actual company or developer initiating the download.

### Reo.dev Maven Redirection

Reo.dev uses a redirection system for Maven commands helps you achieve this enhanced visibility. Here's how: Reo creates a redirection layer that sits in front of your Open Source Software packages - whether they're on Maven Central, GitHub, GitLab or anywhere else.

Users then replace the default pull command:

```python
mvn dependency:get -Dartifact=YourSoftware:version1
```

with a domain-specific command:

{% code overflow="wrap" %}

```python
mvn dependency:get -Dartifact=YourSoftware:version1 -DremoteRepositories=https://yourcompany.com
```

{% endcode %}

{% hint style="info" %}
**Note**: `"https://[yourcompany.com](<http://yourcompany.com/>)"` serves as a proxy for actual package registry and is not a host of the package.
{% endhint %}

Your Maven artifacts will continue to be hosted at Maven Central / Github or any other repository that you originally configured. Savvy users can always directly pull from the original package hub without anything breaking.

When a mvn dependency:get command is executed with the new domain-specific command, the request is redirected (307 redirect) on to the original registry for package download.

Reo.dev can map multiple packages to multiple registries. Each package will need a unique URL on "[yourcompany.com](http://yourcompany.com/)" which maps to the correct package repository.

Example:

`yoursoftware/version1 -> <https://yourcompany.com/yoursoftware/version1`>

`yoursoftware/version2 -> <https://yourcompany.com/yoursoftware/version2`>

`yoursoftware/betasoftware/version08 -> <https://yourcompany.com/yoursoftware/betasoftware/version08`>

Since this redirection service and the URL (https\://[yourcompany.com/YourSoftware](http://yourcompany.com/YourSoftware)) is maintained by Reo.dev, you will now get far richer insights on the user downloading your software, just as if you were hosting it yourself.

You will get:

| **Information**                                   | **Description**                                                                                      |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| IP Level De-anonymization                         | De-anonymized accounts that have downloaded your Maven artifact derived from their IP address        |
| Company-level aggregation of Repository downloads | We aggregate Maven downloads across an identified organization to create picture of adoption levels. |

### Final Flow Summary

<table data-header-hidden><thead><tr><th width="77.765625"></th><th></th></tr></thead><tbody><tr><td><strong>Step</strong></td><td><strong>Description</strong></td></tr><tr><td>1</td><td>User runs mvn with <a href="https://yourcompany.com">https://yourcompany.com</a></td></tr><tr><td>2</td><td>Request hits Maven endpoint of <a href="https://yourcompany.com">https://yourcompany.com</a></td></tr><tr><td>3</td><td>Request is proxied to reo.dev</td></tr><tr><td>4</td><td>reo.dev issues a 307 redirect to actual registry</td></tr><tr><td>5</td><td>Maven CLI downloads artifact from registry</td></tr></tbody></table>

The redirection system ensures that while you gain enhanced visibility into who is downloading your packages, the actual downloads continue to happen directly from the original registries, maintaining performance and reliability.

### Configuration Setup

Once you configure the Reo redirection system, your users will have the option to use the new URL to pull Maven artifacts. Update your documentation and Gtihub release notes to reflect the new URL.

💡 **Note**: Your Maven artifacts will continue to be hosted at Maven Central / Github or any other repository that you originally configured. Savvy users can always directly pull from the original package hub without anything breaking.

### Certificate Setup for HTTPS

To enable secure access, a TLS certificate for your custom domain (e.g., [yourcompany.com](http://yourcompany.com/)) is required.

**Issue a TLS Certificate:** This certificate can be created yourself or by [reo.dev](http://reo.dev/) for you. Get a TLS certificate from a trusted provider. Let's Encrypt offers free certificates, Amazon provides them through ACM if you use AWS, or you can purchase one from any established certificate company.

**Update DNS & Install the Certificate:** If reo.dev servers handles traffic or redirects for the domain ([yourcompany.com](http://yourcompany.com/)), DNS records for that domain would need to point to reo.dev servers.&#x20;

The TLS certificate would also need to be installed on reo.dev servers. It's important to note that only the [yourcompany.com](http://yourcompany.com/) domain requires the certificate - no other domains in the setup need certification. While the certificate can be issued and installed by either by you or reo.dev, it must be from a trusted source that client systems will recognize and accept.


---

# 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.reo.dev/integrations/input-sources/developer-insights/maven.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.
