@@ -41,10 +41,12 @@ jobs:
4141
4242 def get_spring_boot_versions():
4343 """Fetch all Spring Boot versions from Maven Central with retry logic"""
44+ # Use the versions API instead of the general search
4445 url = "https://search.maven.org/solrsearch/select"
4546 params = {
4647 "q": "g:org.springframework.boot AND a:spring-boot",
47- "rows": 200,
48+ "core": "gav",
49+ "rows": 500,
4850 "wt": "json"
4951 }
5052
@@ -69,13 +71,23 @@ jobs:
6971
7072 versions = []
7173 for doc in docs:
72- if 'v' not in doc:
73- print(f"Warning: 'v' field missing from doc: {doc}")
74+ # Try different possible version field names
75+ version_field = None
76+ if 'v' in doc:
77+ version_field = doc['v']
78+ elif 'version' in doc:
79+ version_field = doc['version']
80+ elif 'latestVersion' in doc:
81+ # This might be a summary doc, skip it
82+ print(f"Skipping summary doc with latestVersion: {doc.get('latestVersion')}")
7483 continue
75- v = doc['v']
84+ else:
85+ print(f"Warning: No version field found in doc: {doc}")
86+ continue
87+
7688 # Only include release versions (no SNAPSHOT, RC, M versions for 2.x and 3.x)
77- if not any(suffix in v for suffix in ['SNAPSHOT', 'RC', 'BUILD']):
78- versions.append(v )
89+ if not any(suffix in version_field for suffix in ['SNAPSHOT', 'RC', 'BUILD']):
90+ versions.append(version_field )
7991
8092 print(f"Successfully fetched {len(versions)} versions")
8193 return sorted(versions, key=version.parse)
0 commit comments