Class GroupIdRemoteRepositoryFilterSource
java.lang.Object
org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
org.eclipse.aether.internal.impl.filter.GroupIdRemoteRepositoryFilterSource
- All Implemented Interfaces:
org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
,org.eclipse.aether.spi.resolution.ArtifactResolverPostProcessor
@Singleton
@Named("groupId")
public final class GroupIdRemoteRepositoryFilterSource
extends RemoteRepositoryFilterSourceSupport
implements org.eclipse.aether.spi.resolution.ArtifactResolverPostProcessor
Remote repository filter source filtering on G coordinate. It is backed by a file that lists all allowed groupIds
and groupId not present in this file are filtered out.
The file can be authored manually: format is one groupId per line, comments starting with "#" (hash) amd empty lines for structuring are supported. The file can also be pre-populated by "record" functionality of this filter. When "recording", this filter will not filter out anything, but will instead populate the file with all encountered groupIds.
The groupId file is expected on path "${basedir}/groupId-${repository.id}.txt".
The groupId file once loaded are cached in component, so in-flight groupId file change during component existence are NOT noticed.
- 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
ConstructorDescriptionGroupIdRemoteRepositoryFilterSource
(RepositorySystemLifecycle repositorySystemLifecycle) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.aether.spi.connector.filter.RemoteRepositoryFilter
getRemoteRepositoryFilter
(org.eclipse.aether.RepositorySystemSession session) protected boolean
isEnabled
(org.eclipse.aether.RepositorySystemSession session) Returnstrue
if session configuration contains this name set totrue
.void
postProcess
(org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.resolution.ArtifactResult> artifactResults) 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:
-
CONFIG_PROP_RECORD
Should filter go into "record" mode (and collect encountered artifacts)?- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()
- Value type:
Boolean
- Default value:
- false
-
-
Constructor Details
-
GroupIdRemoteRepositoryFilterSource
@Inject public GroupIdRemoteRepositoryFilterSource(RepositorySystemLifecycle repositorySystemLifecycle)
-
-
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
public org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilter getRemoteRepositoryFilter(org.eclipse.aether.RepositorySystemSession session) - Specified by:
getRemoteRepositoryFilter
in interfaceorg.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource
-
postProcess
public void postProcess(org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.resolution.ArtifactResult> artifactResults) - Specified by:
postProcess
in interfaceorg.eclipse.aether.spi.resolution.ArtifactResolverPostProcessor
-