FWIW, the following patch and deleting nbbuild/build manually got things
building. It may be that the patch is unnecessary and just manually
cleaning would have done it (I didn't really examine what the code I
patched does, but it appears to be something that is trying to generate
release details and assumes it is always running in a continuous build or
something).
The build also now fusses that a bunch of my local branch names "is not
having good pattern" (so what?).
diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
b/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
index 3a0bd09028..761620f70b 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/ReleaseJsonProperties.java
@@ -109,7 +109,10 @@ public class ReleaseJsonProperties extends Task {
JSONObject releaseList = (JSONObject) jsonParser.parse(reader);
log("Processing release: " + releaseList.keySet().toString());
for (Object object : releaseList.keySet()) {
- ri.add(manageRelease(object.toString(),
releaseList.get(object)));
+ ReleaseInfo info = manageRelease(object.toString(),
releaseList.get(object));
+ if (info != null) {
+ ri.add(info);
+ }
}
} catch (ParseException | IOException ex) {
throw new BuildException(ex);
@@ -227,7 +230,11 @@ public class ReleaseJsonProperties extends Task {
ReleaseInfo ri = new ReleaseInfo(key);
// mandatory element
JSONObject jsonrelease = (JSONObject) arelease;
- ri.setPosition(Integer.parseInt((String) getJSONInfo(jsonrelease,
"position", "Order of release starting")));
+ String r =(String) getJSONInfo(jsonrelease, "position", "Order of
release starting", false);
+ if (r == null) {
+ return null;
+ }
+ ri.setPosition(Integer.parseInt(r));
// previous release date
JSONObject previousrelease = (JSONObject) getJSONInfo(jsonrelease,
"previousreleasedate", "Apidoc: Date of previous Release");
ri.setPreviousRelease(
@@ -285,6 +292,10 @@ public class ReleaseJsonProperties extends Task {
}
private Object getJSONInfo(JSONObject json, String key, String info) {
+ return getJSONInfo(json, key, info, true);
+ }
+
+ private Object getJSONInfo(JSONObject json, String key, String info,
boolean shouldThrow) {
Object result = json.get(key);
if (result == null) {
throw new BuildException("Cannot retrieve key " + key + ",
this is for" + info);