Class PrefixesRemoteRepositoryFilterSource
java.lang.Object
org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
org.eclipse.aether.internal.impl.filter.PrefixesRemoteRepositoryFilterSource
- All Implemented Interfaces:
RemoteRepositoryFilterSource
@Singleton
@Named("prefixes")
public final class PrefixesRemoteRepositoryFilterSource
extends RemoteRepositoryFilterSourceSupport
Remote repository filter source filtering on path prefixes. It is backed by a file that lists all allowed path
prefixes from remote repository. Artifact that layout converted path (using remote repository layout) results in
path with no corresponding prefix present in this file is filtered out.
The file can be authored manually: format is one prefix per line, comments starting with "#" (hash) and empty lines for structuring are supported, The "/" (slash) character is used as file separator. Some remote repositories and MRMs publish these kind of files, they can be downloaded from corresponding URLs.
The prefix file is expected on path "${basedir}/prefixes-${repository.id}.txt".
The prefixes file is once loaded and cached, so in-flight prefixes file change during component existence are not noticed.
Examples of published prefix files:
- Central: prefixes.txt
- Apache Releases: prefixes.txt
- Since:
- 1.9.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
RemoteRepositoryFilterSourceSupport.SimpleResult
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPrefixesRemoteRepositoryFilterSource
(RepositoryLayoutProvider repositoryLayoutProvider) -
Method Summary
Modifier and TypeMethodDescriptionProvides the filter instance for given session, ornull
if this instance wants to abstain from participating in filtering.protected boolean
isEnabled
(RepositorySystemSession session) Returnstrue
if session configuration contains this name set totrue
.Methods inherited from class org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
getBasedir
-
Field Details
-
NAME
- See Also:
-
CONFIG_PROP_ENABLED
Is filter enabled?- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
Boolean
- Default value:
- false
-
CONFIG_PROP_BASEDIR
The basedir where to store filter files. If path is relative, it is resolved from local repository root.- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
String
- Default value:
LOCAL_REPO_PREFIX_DIR
-
LOCAL_REPO_PREFIX_DIR
- See Also:
-
-
Constructor Details
-
PrefixesRemoteRepositoryFilterSource
@Inject public PrefixesRemoteRepositoryFilterSource(RepositoryLayoutProvider repositoryLayoutProvider)
-
-
Method Details
-
isEnabled
Description copied from class:RemoteRepositoryFilterSourceSupport
Returnstrue
if session configuration contains this name set totrue
.Default is
false
.- Specified by:
isEnabled
in classRemoteRepositoryFilterSourceSupport
-
getRemoteRepositoryFilter
Description copied from interface:RemoteRepositoryFilterSource
Provides the filter instance for given session, ornull
if this instance wants to abstain from participating in filtering.- Returns:
- The filter for given session or
null
.
-