use of org.eclipse.m2e.core.project.ProjectImportConfiguration in project sling by apache.
the class AbstractNewMavenBasedSlingApplicationWizard method createProjects.
@Override
protected List<IProject> createProjects(IProgressMonitor monitor) throws CoreException {
IPath location = chooseArchetypePage.getLocation();
Archetype archetype = chooseArchetypePage.getSelectedArchetype();
String groupId = archetypeParametersPage.getGroupId();
String artifactId = archetypeParametersPage.getArtifactId();
String version = archetypeParametersPage.getVersion();
String javaPackage = archetypeParametersPage.getJavaPackage();
Properties properties = archetypeParametersPage.getProperties();
ProjectImportConfiguration configuration = new ProjectImportConfiguration();
IProject existingProject = ResourcesPlugin.getWorkspace().getRoot().getProject(artifactId);
if (existingProject != null && existingProject.exists()) {
throw new IllegalStateException("A project with the name " + artifactId + " already exists.");
}
advance(monitor, 1);
List<IProject> projects = MavenPlugin.getProjectConfigurationManager().createArchetypeProjects(location, archetype, groupId, artifactId, version, javaPackage, properties, configuration, new NullProgressMonitor());
monitor.worked(3);
return projects;
}
Aggregations