'Reposilite - configure a mirror
I'm configuring reposilite to be (also) a mirror for maven artifacts.
This is how I have it configured on the local PC %userprofile%\.m2\settings.xml
my DNS resolves reposilite.local as local IP
<settings>
<server> <!-- inner maven repository (same as mirror) -->
<id>com.co.reposilite-releases</id>
<username>user</username>
<password>s3cr3t</password>
</server>
</servers>
<mirrors>
<mirror>
<id>internal-repository</id>
<name>mirror</name>
<url>http://reposilite.local</url>
<mirrorOf>*</mirrorOf>
<username>user</username>
<password>s3cr3t</password>
</mirror>
</mirrors>
</settings>
On my reposilite server reposilite.cdn :
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Reposilite #
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Hostname
hostname: 0.0.0.0
# Port to bind
port: 80
# Custom base path
basePath: /
# Any kind of proxy services change real ip.
# The origin ip should be available in one of the headers.
# Nginx: X-Forwarded-For
# Cloudflare: CF-Connecting-IP
# Popular: X-Real-IP
forwardedIp: X-Forwarded-For
# Enable Swagger (/swagger-docs) and Swagger UI (/swagger)
swagger: false
# Debug
debugEnabled: false
# Support encrypted connections
sslEnabled: false
# SSL port to bind
sslPort: 443
# Key store file to use.
# You can specify absolute path to the given file or use ${WORKING_DIRECTORY} variable.
keyStorePath: ${WORKING_DIRECTORY}/keystore.jks
# Key store password to use
keyStorePassword: ""
# Redirect http traffic to https
enforceSsl: false
# Control the maximum amount of data assigned to Reposilite instance
# Supported formats: 90%, 500MB, 10GB
diskQuota: 10GB
# List of supported Maven repositories.
# First directory on the list is the main (primary) repository.
# Tu mark repository as private, prefix its name with a dot, e.g. ".private"
repositories [
releases
snapshots
dev
]
# Allow to omit name of the main repository in request
# e.g. /org/panda-lang/reposilite will be redirected to /releases/org/panda-lang/reposilite
rewritePathsEnabled: true
# Accept deployment connections
deployEnabled: true
# List of proxied repositories.
# Reposilite will search for an artifact in remote repositories listed below,
# if the requested artifact was not found.
proxied [
https://europe-maven.pkg.dev/jxbrowser
https://www.license4j.com/maven
https://jitpack.io
https://repo1.maven.org/maven2
]
# Reposilite can store proxied artifacts locally to reduce response time and improve stability
storeProxied: true
# Proxying is disabled by default in private repositories because of the security policy.
# Enabling this feature may expose private data like i.e. artifact name used in your company.
proxyPrivate: true
# How long Reposilite can wait for establishing the connection with a remote host. (In seconds)
proxyConnectTimeout: 3
# How long Reposilite can read data from remote proxy. (In seconds)
# Increasing this value may be required in case of proxying slow remote repositories.
proxyReadTimeout: 15
# Title displayed by frontend
title: Company's Maven
# Description displayed by frontend
description: Private Maven repository hosted through the Reposilite
# Accent color used by frontend
accentColor: #2fd4aaroot
after firing
E:\> mvn package -U
I got:
Downloading from internal-repository: http://reposilite.local/com/teamdev/jxbrowser/jxbrowser-javafx/7.19/jxbrowser-javafx-7.19.pom
[WARNING] The POM for com.teamdev.jxbrowser:jxbrowser-javafx:jar:7.19 is missing, no dependency information available
Also on the mirror the artifacts I'm downloading are not being downloaded
NOTES: The develop environment is windows, reposilite runs on a ubuntu-server vm.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
