39
39
class ListOpenJavaDevelopmentKits {
40
40
41
41
/** Current General-Availability release number. */
42
- static final String GA = System .getProperty ("GA" , "17" );
42
+ static final String GA = System .getProperty ("GA" , "18" );
43
+
44
+ /** Current Soon-Archived release number. */
45
+ static final String SA = System .getProperty ("SA" , "17" );
43
46
44
47
/** Early-Access Releases, as comma separated names. */
45
- static final String EA = System .getProperty ("EA" , "19,18, loom,metropolis,panama,valhalla" );
48
+ static final String EA = System .getProperty ("EA" , "19,loom,metropolis,panama,valhalla" );
46
49
47
50
/** Include archived releases flag. */
48
51
static final boolean ARCHIVES = Boolean .getBoolean ("ARCHIVES" );
@@ -66,6 +69,7 @@ class ListOpenJavaDevelopmentKits {
66
69
public static void main (String ... args ) {
67
70
if (args .length == 0 ) {
68
71
listGeneralAvailabilityRelease ();
72
+ listSoonArchivedRelease ();
69
73
listEarlyAccessReleases ();
70
74
if (ARCHIVES ) listArchivedReleases ();
71
75
} else {
@@ -94,6 +98,21 @@ static List<String> generateGeneralAvailabilityAliasKeys(String[] components) {
94
98
return List .of (alias1 , alias2 );
95
99
}
96
100
101
+ static void listSoonArchivedRelease () {
102
+ var html = browse ("https://jdk.java.net/" + SA + "/" );
103
+ var directs = parse (html );
104
+ print ("Soon-Archived Release" , directs );
105
+
106
+ var aliases = alias (directs , ListOpenJavaDevelopmentKits ::generateSoonArchivedAliasKeys );
107
+ print ("Soon-Archived Release (Alias)" , aliases );
108
+ }
109
+
110
+ static List <String > generateSoonArchivedAliasKeys (String [] components ) {
111
+ components [1 ] = "latest" ;
112
+ var alias1 = String .join ("," , components );
113
+ return List .of (alias1 );
114
+ }
115
+
97
116
static void listEarlyAccessReleases () {
98
117
var names = List .of (EA .split ("," ));
99
118
if (names .isEmpty ()) return ;
@@ -140,6 +159,7 @@ static void listArchivedReleases() {
140
159
141
160
static List <String > generateArchivedAliasKeys (String [] components ) {
142
161
if (components [0 ].equals (GA )) return List .of (); // "latest" is covered by GA
162
+ if (components [0 ].equals (SA )) return List .of (); // "latest" is covered by SA
143
163
components [1 ] = "latest" ;
144
164
var alias = String .join ("," , components );
145
165
return List .of (alias );
0 commit comments