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 Stringprivate static final org.slf4j.Loggerstatic final Stringprivate static final RemoteRepositoryFilter.Resultprivate final AtomicBooleanprivate final RepositorySystemLifecycleprivate 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 PathReturns the groupId path.Provides the filter instance for given session, ornullif this instance wants to abstain from participating in filtering.private booleanisRecord(RepositorySystemSession session) Returnstrueif given session is recording.loadRepositoryRules(Path filePath) voidpostProcess(RepositorySystemSession session, List<ArtifactResult> artifactResults) Receives resolver results just before it would return it to caller.private voidOn-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:RemoteRepositoryFilterSourceProvides the filter instance for given session, ornullif this instance wants to abstain from participating in filtering.- Specified by:
getRemoteRepositoryFilterin interfaceRemoteRepositoryFilterSource- Returns:
- The filter for given session or
null.
-
postProcess
Description copied from interface:ArtifactResolverPostProcessorReceives resolver results just before it would return it to caller. Is able to generate "resolution failure" by augmenting passed inArtifactResults (artifacts should be "unresolved" and exceptions added).Implementations must be aware that the passed in list of
ArtifactResults 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:
postProcessin interfaceArtifactResolverPostProcessor
-
filePath
Returns the groupId path. The file and parents may not exist, this method merely calculate the path. -
cacheRules
-
loadRepositoryRules
-
isRecord
Returnstrueif given session is recording. -
saveRecordedLines
private void saveRecordedLines()On-close handler that saves recorded rules, if any.
-