# Maven mirror (pkg.shecan.ir)

> Mirror of Maven Central, Google Maven, the Gradle Plugin Portal and JitPack (jitpack.io) for Maven and Gradle.

- Upstream: Maven Central, Google Maven, Gradle Plugin Portal, JitPack
- Mirror URLs: <https://mirror-maven.pkg.shecan.ir/central/>, <https://mirror-maven.pkg.shecan.ir/google/>, <https://mirror-maven.pkg.shecan.ir/gradle-plugins/>, <https://mirror-maven.pkg.shecan.ir/jitpack/>
- Clients: maven, gradle
- Service status: <https://pkg.shecan.ir/status.json> (key `maven`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/maven/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/maven.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `maven`, mirror `shecan`): <https://audit.shecan.ir/#maven>

## Limitations

- The Gradle Wrapper distribution (services.gradle.org) is served by the separate gradle mirror (mirror-gradle.pkg.shecan.ir, distributionUrl in gradle-wrapper.properties).
- SNAPSHOT repositories and publishing (mvn deploy, gradle publish) are not provided.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### maven: persistent (user- or system-wide configuration)

Configuration file: `%USERPROFILE%\.m2\settings.xml` or `~/.m2/settings.xml`

```xml
<settings>
  <mirrors>
    <mirror>
      <id>shecan</id>
      <mirrorOf>central</mirrorOf>
      <url>https://mirror-maven.pkg.shecan.ir/central/</url>
    </mirror>
  </mirrors>
</settings>
```

Undo / restore the default

```sh
mv ~/.m2/settings.xml ~/.m2/settings.xml.shecan-off
```

### gradle: project (files inside the project)

Configuration file, Kotlin DSL: `settings.gradle.kts`

```kotlin
pluginManagement {
    repositories {
        maven("https://mirror-maven.pkg.shecan.ir/gradle-plugins/")
    }
}
dependencyResolutionManagement {
    repositories {
        maven("https://mirror-maven.pkg.shecan.ir/google/")
        maven("https://mirror-maven.pkg.shecan.ir/central/")
        maven("https://mirror-maven.pkg.shecan.ir/jitpack/")
    }
}
```

Configuration file, Groovy DSL: `settings.gradle`

```groovy
pluginManagement {
    repositories {
        maven { url 'https://mirror-maven.pkg.shecan.ir/gradle-plugins/' }
    }
}
dependencyResolutionManagement {
    repositories {
        maven { url 'https://mirror-maven.pkg.shecan.ir/google/' }
        maven { url 'https://mirror-maven.pkg.shecan.ir/central/' }
        maven { url 'https://mirror-maven.pkg.shecan.ir/jitpack/' }
    }
}
```
