class DefaultArtifactResolver implements ArtifactResolver {

    @Override
    public ArtifactResolverResult resolve(ArtifactResolverRequest request)
            throws ArtifactResolverException, IllegalArgumentException {<FILL_FUNCTION_BODY>}
}

        nonNull(request, "request");
        InternalSession session = InternalSession.from(request.getSession());
        try {
            Map<Artifact, Path> paths = new HashMap<>();
            ArtifactManager artifactManager = session.getService(ArtifactManager.class);
            List<RemoteRepository> repositories = session.toRepositories(session.getRemoteRepositories());
            List<ArtifactRequest> requests = new ArrayList<>();
            for (ArtifactCoordinate coord : request.getCoordinates()) {
                org.eclipse.aether.artifact.Artifact aetherArtifact = session.toArtifact(coord);
                Artifact artifact = session.getArtifact(aetherArtifact);
                Path path = artifactManager.getPath(artifact).orElse(null);
                if (path != null) {
                    paths.put(artifact, path);
                } else {
                    requests.add(new ArtifactRequest(aetherArtifact, repositories, null));
                }
            }
            if (!requests.isEmpty()) {
                List<ArtifactResult> results =
                        session.getRepositorySystem().resolveArtifacts(session.getSession(), requests);
                for (ArtifactResult result : results) {
                    Artifact artifact = session.getArtifact(result.getArtifact());
                    Path path = result.getArtifact().getFile().toPath();
                    artifactManager.setPath(artifact, path);
                    paths.put(artifact, path);
                }
            }
            return () -> paths;
        } catch (ArtifactResolutionException e) {
            throw new ArtifactResolverException("Unable to resolve artifact", e);
        }
    
<no_super_class>