if (!upToDate && prettyPrint) {
prettyPrint(wsdlFile);
}
}
FileArtifact wsdlArtifact = new FileArtifact(getName(), wsdl.getId() + ".wsdl", wsdlFile);
wsdlArtifact.setDescription("WSDL file for namespace " + wsdl.getTargetNamespace());
getEnunciate().addArtifact(wsdlArtifact);
}
for (SchemaInfo schemaInfo : ns2schema.values()) {
File schemaFile = (File) schemaInfo.getProperty("file");
if (schemaFile == null) {
String file = (String) schemaInfo.getProperty("filename");
schemaFile = new File(artifactDir, file);
schemaInfo.setProperty("file", schemaFile);
if (!upToDate && prettyPrint) {
prettyPrint(schemaFile);
}
if (!upToDate && validateSchemas) {
//todo: write some logic to validate the schemas.
}
}
FileArtifact schemaArtifact = new FileArtifact(getName(), schemaInfo.getId() + ".xsd", schemaFile);
schemaArtifact.setDescription("Schema file for namespace " + schemaInfo.getNamespace());
getEnunciate().addArtifact(schemaArtifact);
}
if (!isDisableWadl()) {
File wadl = new File(artifactDir, "application.wadl");
if (wadl.exists()) {
FileArtifact wadlArtifact = new FileArtifact(getName(), "application.wadl", wadl);
wadlArtifact.setDescription("WADL document");
getEnunciate().addArtifact(wadlArtifact);
prettyPrint(wadl);
model.setWadlFile(wadl);
}
}