@@ -27,6 +27,7 @@ protected override async Task<IEnumerable<string>> GetGroupIdsAsync()
2727 protected override async Task < IEnumerable < Artifact > > GetArtifactsAsync ( string groupId )
2828 {
2929 var artifacts = new List < Artifact > ( ) ;
30+ const string VERSION_REREX = "^\\ d+" ;
3031
3132 var groupDir = CombinePaths ( groupId . Split ( '.' ) ) ;
3233
@@ -36,7 +37,7 @@ protected override async Task<IEnumerable<Artifact>> GetArtifactsAsync(string gr
3637
3738 var versions = await GetDirectoriesAsync ( CombinePaths ( groupDir , artifactDir ) ) . ConfigureAwait ( false ) ;
3839
39- if ( ! string . IsNullOrEmpty ( artifactDir ) && versions != null && versions . Any ( ) )
40+ if ( ! string . IsNullOrEmpty ( artifactDir ) && versions != null && versions . Any ( x => Regex . IsMatch ( x , VERSION_REREX ) ) )
4041 artifacts . Add ( new Artifact ( artifactDir , groupId , versions . ToArray ( ) ) ) ;
4142 }
4243
@@ -53,20 +54,25 @@ async Task recurseDir(string path, List<string> groupIds)
5354 groupId = groupId . Substring ( 0 , groupId . LastIndexOf ( '.' ) ) ;
5455
5556 // See if this group was already detected and exit our recursion if so
56- if ( ! string . IsNullOrEmpty ( groupId ) && groupIds . Any ( gid => gid . Equals ( groupId , StringComparison . OrdinalIgnoreCase ) ) )
57- return ;
57+ // if (string.IsNullOrEmpty(groupId)
58+ // && groupIds.Any(gid => gid.Equals(groupId, StringComparison.OrdinalIgnoreCase))
59+ // )
60+ // return;
5861
5962 // If we got this far, we aren't trying to process a duplicate group name, so continue looking for maven-metadata.xml
6063 var files = await GetFilesAsync ( path ) . ConfigureAwait ( false ) ;
6164
6265 // Look for maven-metadata.xml
63- var metadataItem = files ? . FirstOrDefault ( f => f . Equals ( "maven-metadata.xml" , StringComparison . OrdinalIgnoreCase ) ) ;
66+ var metadataItem = files ? . FirstOrDefault ( f => f . Equals ( "maven-metadata.xml" , StringComparison . OrdinalIgnoreCase )
67+ || f . Equals ( ":maven-metadata.xml" , StringComparison . OrdinalIgnoreCase ) ) ;
6468
6569 // If we found the maven-metadata.xml file, we are on an artifact folder
6670 // We can stop recursing subdirs at this point since we found artifact info
6771 if ( ! string . IsNullOrEmpty ( metadataItem ) )
6872 {
69- groupIds . Add ( groupId ) ;
73+ if ( ! groupIds . Any ( x => string . Equals ( x , groupId , StringComparison . OrdinalIgnoreCase ) ) ) {
74+ groupIds . Add ( groupId ) ;
75+ }
7076 }
7177 else
7278 {
0 commit comments