use of org.eclipse.che.ide.ant.tools.buildfile.BuildFileGenerator in project che by eclipse.
the class AntProjectGenerator method onCreateProject.
@Override
public void onCreateProject(FolderEntry baseFolder, Map<String, AttributeValue> attributes, Map<String, String> options) throws ForbiddenException, ConflictException, ServerException {
final String buildXmlContent = new BuildFileGenerator(baseFolder.getName()).getBuildFileContent();
baseFolder.createFile(AntAttributes.BUILD_FILE, buildXmlContent.getBytes(), "text/xml");
AttributeValue sourceFolders = attributes.get(AntAttributes.SOURCE_FOLDER);
if (sourceFolders != null) {
baseFolder.createFolder(sourceFolders.getString());
}
AttributeValue testSourceFolders = attributes.get(AntAttributes.TEST_SOURCE_FOLDER);
if (testSourceFolders != null) {
baseFolder.createFolder(testSourceFolders.getString());
}
}
Aggregations