Class GroupIdRemoteRepositoryFilterSource
- All Implemented Interfaces:
RemoteRepositoryFilterSource
,ArtifactResolverPostProcessor
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 ClassesNested classes/interfaces inherited from class org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
RemoteRepositoryFilterSourceSupport.SimpleResult
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentHashMap
<Path, Boolean> private static final String
(package private) static final String
(package private) static final String
private static final org.slf4j.Logger
static final String
private static final RemoteRepositoryFilter.Result
private final AtomicBoolean
private final RepositorySystemLifecycle
private final ConcurrentHashMap
<Path, Set<String>> Fields inherited from class org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
LOCAL_REPO_PREFIX_DIR
-
Constructor Summary
ConstructorsConstructorDescriptionGroupIdRemoteRepositoryFilterSource
(RepositorySystemLifecycle repositorySystemLifecycle) -
Method Summary
Modifier and TypeMethodDescriptioncacheRules
(RepositorySystemSession session, RemoteRepository remoteRepository) private Path
Returns the groupId path.Provides the filter instance for given session, ornull
if this instance wants to abstain from participating in filtering.private boolean
isRecord
(RepositorySystemSession session) Returnstrue
if given session is recording.loadRepositoryRules
(Path filePath) void
postProcess
(RepositorySystemSession session, List<ArtifactResult> artifactResults) Receives resolver results just before it would return it to caller.private void
On-close handler that saves recorded rules, if any.Methods inherited from class org.eclipse.aether.internal.impl.filter.RemoteRepositoryFilterSourceSupport
configPropKey, getBasedir, isEnabled
-
Field Details
-
NAME
- See Also:
-
CONF_NAME_RECORD
- See Also:
-
GROUP_ID_FILE_PREFIX
- See Also:
-
GROUP_ID_FILE_SUFFIX
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
repositorySystemLifecycle
-
rules
-
changedRules
-
onShutdownHandlerRegistered
-
NOT_PRESENT
-
NOT_PRESENT_RESULT
-
-
Constructor Details
-
GroupIdRemoteRepositoryFilterSource
@Inject public GroupIdRemoteRepositoryFilterSource(RepositorySystemLifecycle repositorySystemLifecycle)
-
-
Method Details
-
getRemoteRepositoryFilter
Description copied from interface:RemoteRepositoryFilterSource
Provides the filter instance for given session, ornull
if this instance wants to abstain from participating in filtering.- Specified by:
getRemoteRepositoryFilter
in interfaceRemoteRepositoryFilterSource
- Returns:
- The filter for given session or
null
.
-
postProcess
Description copied from interface:ArtifactResolverPostProcessor
Receives resolver results just before it would return it to caller. Is able to generate "resolution failure" by augmenting passed inArtifactResult
s (artifacts should be "unresolved" and exceptions added).Implementations must be aware that the passed in list of
ArtifactResult
s may have failed resolutions, best to check that usingArtifactResult.isResolved()
method.The implementations must be aware that this call may be "hot", so it directly affects the performance of resolver in general.
- Specified by:
postProcess
in interfaceArtifactResolverPostProcessor
-
filePath
Returns the groupId path. The file and parents may not exist, this method merely calculate the path. -
cacheRules
-
loadRepositoryRules
-
isRecord
Returnstrue
if given session is recording. -
saveRecordedLines
private void saveRecordedLines()On-close handler that saves recorded rules, if any.
-