All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.choncms.maven.ProjectCreatorMojo Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package com.choncms.maven;

import java.io.IOException;
import java.util.Map;

/**
 * Goal which creates new chon based project
 * 
 * @requiresProject false
 * @goal new-project
 */
public class ProjectCreatorMojo extends AbstractCreatorMojo {
	
	private String projectName = "com.choncms.example";
	
	
	@Override
	protected Map getTemplateVariables() {
		Map tplVars = super.getTemplateVariables();
		try {
			System.out.println("Enter project groupId - your chon based project name (root package).");
			projectName = getValue("Project groupId (Project Name) ", projectName);
			tplVars.put("project-name", projectName);
			tplVars.put("project-groupId", projectName);
			tplVars.put("project-package", projectName);
			tplVars.put("project-parent-groupId", projectName);
			
			tplVars.put("isSimpleTemplate", true);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return tplVars;
	}


	protected String getProjectType() {
		return "project";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy