class RemoteRepositoryLoadingHelper extends java.lang.Object implements IRepositoryIdManager
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.net.URI,java.lang.String> |
knownMavenRepositoryIds |
private MavenLogger |
logger |
private MavenRepositorySettings |
settings |
SERVICE_NAME| Constructor and Description |
|---|
RemoteRepositoryLoadingHelper(MavenRepositorySettings settings,
MavenLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMapping(java.lang.String mavenRepositoryId,
java.net.URI location) |
private static boolean |
certainlyNoRemoteURL(java.net.URI location) |
private MavenRepositoryLocation |
effectiveLocationFor(java.net.URI location,
boolean forLoading) |
java.net.URI |
getEffectiveLocation(java.net.URI location) |
java.net.URI |
getEffectiveLocationAndPrepareLoad(java.net.URI location) |
private static java.net.URI |
normalize(java.net.URI location) |
private void |
setPasswordForLoading(MavenRepositoryLocation location)
Sets passwords configured in the Maven settings in p2.
|
private final MavenRepositorySettings settings
private final MavenLogger logger
private java.util.Map<java.net.URI,java.lang.String> knownMavenRepositoryIds
public RemoteRepositoryLoadingHelper(MavenRepositorySettings settings, MavenLogger logger)
public void addMapping(java.lang.String mavenRepositoryId,
java.net.URI location)
addMapping in interface IRepositoryIdManagerprivate static java.net.URI normalize(java.net.URI location)
public java.net.URI getEffectiveLocation(java.net.URI location)
public java.net.URI getEffectiveLocationAndPrepareLoad(java.net.URI location)
throws org.eclipse.equinox.p2.core.ProvisionException
org.eclipse.equinox.p2.core.ProvisionExceptionprivate MavenRepositoryLocation effectiveLocationFor(java.net.URI location, boolean forLoading)
private void setPasswordForLoading(MavenRepositoryLocation location) throws org.eclipse.equinox.p2.core.ProvisionException
Warning: This method heavily relies on side-effects. Instead of remembering the credentials just for the given location, p2 associates the password with the host. This allows to load children of a composite repository with the same credentials as the parent, without having to specify all children in the Maven settings. This feature can easily break if repositories are loaded in parallel. If this shall be supported, a lock is needed here (TODO).
org.eclipse.equinox.p2.core.ProvisionExceptionprivate static boolean certainlyNoRemoteURL(java.net.URI location)