Search in sources :

Example 1 with BuildFileGenerator

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());
    }
}
Also used : BuildFileGenerator(org.eclipse.che.ide.ant.tools.buildfile.BuildFileGenerator) AttributeValue(org.eclipse.che.api.project.server.type.AttributeValue)

Aggregations

AttributeValue (org.eclipse.che.api.project.server.type.AttributeValue)1 BuildFileGenerator (org.eclipse.che.ide.ant.tools.buildfile.BuildFileGenerator)1