blob: 380c4dc36b7ba10ecc5c7d8d66716b05f69c6b1e [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*
*******************************************************************************/
package org.eclipse.vorto.codegen.api.tasks.eclipse;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.vorto.codegen.api.tasks.ITemplate;
import org.eclipse.vorto.codegen.api.tasks.ICodeGeneratorTask;
/**
* Maven Configuration of an Eclipse Project
*
*
*
*/
public class MavenNatureConfiguration extends NatureConfiguration {
private static FolderModule mavenDefaultFolders = new FolderModule(
"src/main/java", "src/main/test", "src/test/java",
"src/test/resources", "target/classes", "target/test-classes");
private final PomFileModule pomFileGenerator;
public MavenNatureConfiguration(ITemplate pomFile,
IEclipseProjectConfiguration... configurations) {
super("org.eclipse.m2e.core.maven2Nature", configurations);
pomFileGenerator = new PomFileModule(pomFile);
}
@Override
public IEclipseProjectConfiguration configure(IProject project) {
super.configure(project);
return this;
}
@Override
public List<ICodeGeneratorTask> getGeneratorTasks() {
List<ICodeGeneratorTask> modules = new ArrayList<ICodeGeneratorTask>();
modules.add(mavenDefaultFolders);
modules.add(pomFileGenerator);
return modules;
}
}