Search in sources :

Example 1 with PlatformGeneratorMainTemplate

use of org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.PlatformGeneratorMainTemplate in project vorto by eclipse.

the class ProjectCreationTask method createMicroServiceProject.

private void createMicroServiceProject(IProgressMonitor monitor) throws JavaModelException {
    EclipseProjectGenerator<IGeneratorProjectContext> generator = new EclipseProjectGenerator<>(new LocationWrapper(context.getWorkspaceLocation(), context.getPackageName() + ".service"));
    generator.mavenNature(new MicroServicePomTemplate(), "src/main/java", "src/main/resources", "src/test/java");
    generator.addTask(new PlatformGeneratorMainTemplate());
    generator.addTask(new ApplicationPropertiesTemplate());
    generator.addTask(new ApplicationProfileProperties());
    generator.generate(context, InvocationContext.simpleInvocationContext(), monitor);
}
Also used : MicroServicePomTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.MicroServicePomTemplate) IGeneratorProjectContext(org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext) EclipseProjectGenerator(org.eclipse.vorto.codegen.ui.tasks.EclipseProjectGenerator) LocationWrapper(org.eclipse.vorto.codegen.ui.tasks.LocationWrapper) ApplicationPropertiesTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationPropertiesTemplate) PlatformGeneratorMainTemplate(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.PlatformGeneratorMainTemplate) ApplicationProfileProperties(org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationProfileProperties)

Aggregations

IGeneratorProjectContext (org.eclipse.vorto.codegen.ui.context.IGeneratorProjectContext)1 EclipseProjectGenerator (org.eclipse.vorto.codegen.ui.tasks.EclipseProjectGenerator)1 LocationWrapper (org.eclipse.vorto.codegen.ui.tasks.LocationWrapper)1 ApplicationProfileProperties (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationProfileProperties)1 ApplicationPropertiesTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.ApplicationPropertiesTemplate)1 MicroServicePomTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.MicroServicePomTemplate)1 PlatformGeneratorMainTemplate (org.eclipse.vorto.codegen.ui.wizard.generation.templates.server.PlatformGeneratorMainTemplate)1