Connections Settings are not considering path of url (e.g. for new https://central.sonatype.com)

Aperta
#6,745 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start by reading the MavenBndRepository connection-settings and URL handling code, then trace how credentials are applied when retrieving artifacts from snapshotUrl. The issue describes the behavior and a possible auth=false option, but does not identify files or tests; first determine the existing configuration and test entry points. Done means snapshot retrieval from the stated URL works without credentials when configured, while repositories that require read credentials still work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

At first the new URLs for snapshots moved to:

https://central.sonatype.com/repository/maven-snapshots

If you have connection settings defined the upload works as usual.

But when you want to retrieve snapshots from "https://central.sonatype.com/repository/maven-snapshots", bnd uses the connection settings to get the artifacts.

The problem is now with the new repository, that if you request data without credentials, you can access al artifacts. But if you are logged in, you are only able to access artifacts, you have uploaded.

I dont have a solution yet, but I think about something like a property auth=false at a repository definition:

-plugin.2.Central: \
    aQute.bnd.repository.maven.provider.MavenBndRepository; \
	releaseUrl			= "https://repo.maven.apache.org/maven2/"; \
	snapshotUrl			= "https://central.sonatype.com/repository/maven-snapshots/";\
        index=${.}/central.mvn; \
        readOnly=true; \
        **auth=false;\**
        name="Central"

This should lead, not to take the connection settings when reading the snapshots. I am not sure if it is a good ideo to bind it to the readOnly property, because it might be a use case that you need credentials for a nexus even for read only acces.

Lingua principale
Java
Stelle
557
Fork
303
Merge medio
19h 1m
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bndtools/bnd

Tutte le issue di bndtools/bnd

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.