System.out.println("Failed to retrieve metadata - maybe you need to run build-db?");
System.err .println("Failed to retrieve metadata - maybe you need to run build-db?");
    public void execute() throws BuildException {        if (destDir == null) {            throw new BuildException("destDir attribute is not set");        }        if (database == null) {            throw new BuildException("database attribute is not set");        }        try {            Database db = DatabaseFactory.getDatabase(database);            String modelXml = MetadataManager.retrieve(db, MetadataManager.MODEL);            String keyDefs = MetadataManager.retrieve(db, MetadataManager.KEY_DEFINITIONS);            //String classDescs = MetadataManager.retrieve(db, MetadataManager.CLASS_DESCRIPTIONS);                        Model model = new InterMineModelParser().process(new StringReader(modelXml));            File localModel = new File(destDir,                    MetadataManager.getFilename(MetadataManager.MODEL, model.getName()));                        if (localModel.exists() && IOUtils.contentEquals(new FileReader(localModel), new StringReader(modelXml))) {                System.out.println("Model in database is identical to local model.");                return;            }                        MetadataManager.saveModel(model, destDir);            MetadataManager.saveKeyDefinitions(keyDefs, destDir, model.getName());            //MetadataManager.saveClassDescriptions(classDescs, destDir, model.getName());        } catch (Exception e) {            System.out.println("Failed to retrieve metadata - maybe you need to run build-db?");            throw new BuildException(e);        }    }