in netbeans.apache.org/buildSrc/src/main/groovy/Utils.groovy [77:118]
static def writeCommonJBakeProperties(def data, def map, def out) {
boolean foundType = false,
foundStatus = false
map.each { k, v ->
switch(k) {
case "type":
if(v) {
foundType = true;
}
break;
case "status":
if(v) {
foundStatus = true;
}
break;
default:
break;
}
switch(k) {
case "type":
case "status":
case "title":
case "date":
out << "${k}=${v}\n"
break;
case "tags":
out << "${k}=${parseJBakeTags(v)}\n"
break;
default:
//the rest we don't care about right now
//we'll add that separately
break;
}
}
if(!foundType) {
throw new IllegalStateException("The metadata for ${data.file} at ${data.yml} must include the type.")
}
if(!foundStatus) {
throw new IllegalStateException("The metadata for ${data.file} at ${data.yml} must include the status.")
}
}