private Metadata generateGroupMetadata( final Group group, final List<ArtifactStore> members,
                                            final List<StoreKey> contributingMembers, final String path )
            throws IndyWorkflowException
    {

        if ( !canProcess( path ) )
        {
            logger.error( "The path is not a metadata file: {} ", path );
            return null;
        }

        String toMergePath = path;
        if ( !path.endsWith( MavenMetadataMerger.METADATA_NAME ) )
        {
            toMergePath = normalize( normalize( parentPath( toMergePath ) ), MavenMetadataMerger.METADATA_NAME );
        }

        Metadata meta = getMetaFromCache( group.getKey(), toMergePath );

        if ( meta != null )
        {
            return meta;
        }

        Metadata master = new Metadata();
        master.setVersioning( new Versioning() );

        MetadataIncrementalResult incrementalResult =
                new MetadataIncrementalResult( new HashSet<>( members ), Collections.emptySet(), master );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "cached", this::retrieveCached );

        contributingMembers.addAll( incrementalResult.merged );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "downloaded", this::downloadMissing );

        contributingMembers.addAll( incrementalResult.merged );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "generated", this::generateMissing );

        contributingMembers.addAll( incrementalResult.merged );

        if ( metadataProviders != null )
        {
            master = mergeProviderMetadata( group, incrementalResult.result, toMergePath );
        }
        else
        {
            master = incrementalResult.result;
        }

        if ( !incrementalResult.missing.isEmpty() )
        {
            logger.warn(
                    "After download and generation attempts, metadata is still missing from the following stores: {}",
                    incrementalResult.missing );
        }

        List<String> versions = master.getVersioning().getVersions();
        if ( versions != null && !versions.isEmpty() )
        {
            merger.sortVersions( master );
            return master;
        }

        List<Plugin> plugins = master.getPlugins();
        if ( plugins != null && !plugins.isEmpty() )
        {
            return master;
        }

        logger.error( "The group metadata generation is not successful for path: {} in group: {}", path, group );
        return null;
    }
private Metadata generateGroupMetadata( final Group group, final List<ArtifactStore> members,
                                            final List<StoreKey> contributingMembers, final String path )
            throws IndyWorkflowException
    {

        if ( !canProcess( path ) )
        {
            logger.error( "The path is not a metadata file: {} ", path );
            return null;
        }

        String toMergePath = path;
        if ( !path.endsWith( MavenMetadataMerger.METADATA_NAME ) )
        {
            toMergePath = normalize( normalize( parentPath( toMergePath ) ), MavenMetadataMerger.METADATA_NAME );
        }

        Metadata meta = getMetaFromCache( group.getKey(), toMergePath );

        if ( meta != null )
        {
            return meta;
        }

        Metadata master = new Metadata();
        master.setVersioning( new Versioning() );

        MetadataIncrementalResult incrementalResult =
                new MetadataIncrementalResult( new HashSet<>( members ), Collections.emptySet(), master );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "cached", this::retrieveCached );

        contributingMembers.addAll( incrementalResult.merged );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "downloaded", this::downloadMissing );

        contributingMembers.addAll( incrementalResult.merged );

        incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "generated", this::generateMissing );

        contributingMembers.addAll( incrementalResult.merged );

        if ( metadataProviders != null )
        {
            master = mergeProviderMetadata( group, incrementalResult.result, toMergePath );
        }
        else
        {
            master = incrementalResult.result;
        }

        if ( !incrementalResult.missing.isEmpty() )
        {
            logger.warn(
                    "After download and generation attempts, metadata is still missing from the following stores: {}",
                    incrementalResult.missing );
        }

        List<String> versions = master.getVersioning().getVersions();
        if ( versions != null && !versions.isEmpty() )
        {
            merger.sortVersions( master );
            return master;
        }

        List<Plugin> plugins = master.getPlugins();
        if ( plugins != null && !plugins.isEmpty() )
        {
            return master;
        }

        logger.error( "The group metadata generation is not successful for path: {} in group: {}", path, group );
        return null;
    }
private Metadata generateGroupMetadata ( final Group group , final List < ArtifactStore > members , final List < StoreKey > contributingMembers , final String path ) throws IndyWorkflowException { if ( ! canProcess ( path ) ) { logger . error ( "The path is not a metadata file: {} " , path ) ; return null ; } String toMergePath = path ; if ( ! path . endsWith ( MavenMetadataMerger . METADATA_NAME ) ) { toMergePath = normalize ( normalize ( parentPath ( toMergePath ) ) , MavenMetadataMerger . METADATA_NAME ) ; } Metadata meta = getMetaFromCache ( group . getKey ( ) , toMergePath ) ; if ( meta != null ) { return meta ; } Metadata master = new Metadata ( ) ; master . setVersioning ( new Versioning ( ) ) ; MetadataIncrementalResult incrementalResult = new MetadataIncrementalResult ( new HashSet <> ( members ) , Collections . emptySet ( ) , master ) ; incrementalResult = mergeMissing ( group , incrementalResult , toMergePath , "cached" , this :: retrieveCached ) ; contributingMembers . addAll ( incrementalResult . merged ) ; incrementalResult = mergeMissing ( group , incrementalResult , toMergePath , "downloaded" , this :: downloadMissing ) ; contributingMembers . addAll ( incrementalResult . merged ) ; incrementalResult = mergeMissing ( group , incrementalResult , toMergePath , "generated" , this :: generateMissing ) ; contributingMembers . addAll ( incrementalResult . merged ) ; if ( metadataProviders != null ) { master = mergeProviderMetadata ( group , incrementalResult . result , toMergePath ) ; } else { master = incrementalResult . result ; } if ( ! incrementalResult . missing . isEmpty ( ) ) { logger . warn ( "After download and generation attempts, metadata is still missing from the following stores: {}" , incrementalResult . missing ) ; } List < String > versions = master . getVersioning ( ) . getVersions ( ) ; if ( versions != null && ! versions . isEmpty ( ) ) { merger . sortVersions ( master ) ; return master ; } List < Plugin > plugins = master . getPlugins ( ) ; if ( plugins != null && ! plugins . isEmpty ( ) ) { return master ; } logger . error ( "The group metadata generation is not successful for path: {} in group: {}" , path , group ) ; return null ; }
Will generate group related files(e.g maven-metadata.xml) from cache level, which means all the generation of the
files will be cached. In terms of cache clearing, see #{@link MetadataMergeListener}

@param group
@param members concrete store in group
@param path

@return

@throws IndyWorkflowException
Will generate group related files ( e . g maven - metadata . xml ) from cache level which means all the generation of the files will be cached . In terms of cache clearing see # { @link MetadataMergeListener }