// Path: src/main/java/com/edorasware/one/initializr/InitializrException.java
// @SuppressWarnings("serial")
// public class InitializrException extends RuntimeException {
// 
// 	public InitializrException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public InitializrException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: src/main/java/com/edorasware/one/initializr/metadata/InitializrConfiguration.java
// public static class ParentPom {
// 
// 	/**
// 	 * Parent pom groupId.
// 	 */
// 	private String groupId;
// 
// 	/**
// 	 * Parent pom artifactId.
// 	 */
// 	private String artifactId;
// 
// 	/**
// 	 * Parent pom version.
// 	 */
// 	private String version;
// 
// 	public ParentPom(String groupId, String artifactId, String version) {
// 		this.groupId = groupId;
// 		this.artifactId = artifactId;
// 		this.version = version;
// 	}
// 
// 	public ParentPom() {
// 	}
// 
// 	public String getGroupId() {
// 		return groupId;
// 	}
// 
// 	public void setGroupId(String groupId) {
// 		this.groupId = groupId;
// 	}
// 
// 	public String getArtifactId() {
// 		return artifactId;
// 	}
// 
// 	public void setArtifactId(String artifactId) {
// 		this.artifactId = artifactId;
// 	}
// 
// 	public String getVersion() {
// 		return version;
// 	}
// 
// 	public void setVersion(String version) {
// 		this.version = version;
// 	}
// 
// 	public void validate() {
// 		if (!((!StringUtils.hasText(groupId)
// 				&& !StringUtils.hasText(artifactId)
// 				&& !StringUtils.hasText(version))
// 				|| (StringUtils.hasText(groupId)
// 				&& StringUtils.hasText(artifactId)
// 				&& StringUtils.hasText(version)))) {
// 			throw new InvalidInitializrMetadataException("Custom maven pom "
// 					+ "requires groupId, artifactId and version");
// 		}
// 	}
// 
// }


import com.edorasware.one.initializr.InitializrException;
import com.edorasware.one.initializr.metadata.*;
import com.edorasware.one.initializr.metadata.InitializrConfiguration.Env.Maven.ParentPom;
import com.edorasware.one.initializr.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.util.Assert;
import org.springframework.util.FileSystemUtils;
import org.springframework.util.StreamUtils;
import java.beans.PropertyDescriptor;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.*;
import java.util.stream.Collectors;
		write(new File(dir, ".gitignore"), "gitignore.tmpl", model);
	}

	/**
	 * Resolve the specified {@link ProjectRequest} and return the model to use to
	 * generate the project
	 * @param originalRequest the request to handle
	 * @return a model for that request
	 */
	protected Map<String, Object> resolveModel(ProjectRequest originalRequest) {
		Assert.notNull(originalRequest.getEdorasoneVersion(), "edorasone version must not be null");
		Map<String, Object> model = new LinkedHashMap<>();
		InitializrMetadata metadata = metadataProvider.get();

		ProjectRequest request = requestResolver.resolve(originalRequest, metadata);

		// request resolved so we can log what has been requested
		List<Dependency> dependencies = request.getResolvedDependencies();
		List<String> dependencyIds = dependencies.stream().map(Dependency::getId)
				.collect(Collectors.toList());
		log.info("Processing request{type=" + request.getType() + ", dependencies="
				+ dependencyIds);

		if (isWar(request)) {
			model.put("war", true);
		}

		if (isMavenBuild(request)) {
			model.put("mavenBuild", true);

// Path: src/main/java/com/edorasware/one/initializr/InitializrException.java
// @SuppressWarnings("serial")
// public class InitializrException extends RuntimeException {
// 
// 	public InitializrException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public InitializrException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: src/main/java/com/edorasware/one/initializr/metadata/InitializrConfiguration.java
// public static class ParentPom {
// 
// 	/**
// 	 * Parent pom groupId.
// 	 */
// 	private String groupId;
// 
// 	/**
// 	 * Parent pom artifactId.
// 	 */
// 	private String artifactId;
// 
// 	/**
// 	 * Parent pom version.
// 	 */
// 	private String version;
// 
// 	public ParentPom(String groupId, String artifactId, String version) {
// 		this.groupId = groupId;
// 		this.artifactId = artifactId;
// 		this.version = version;
// 	}
// 
// 	public ParentPom() {
// 	}
// 
// 	public String getGroupId() {
// 		return groupId;
// 	}
// 
// 	public void setGroupId(String groupId) {
// 		this.groupId = groupId;
// 	}
// 
// 	public String getArtifactId() {
// 		return artifactId;
// 	}
// 
// 	public void setArtifactId(String artifactId) {
// 		this.artifactId = artifactId;
// 	}
// 
// 	public String getVersion() {
// 		return version;
// 	}
// 
// 	public void setVersion(String version) {
// 		this.version = version;
// 	}
// 
// 	public void validate() {
// 		if (!((!StringUtils.hasText(groupId)
// 				&& !StringUtils.hasText(artifactId)
// 				&& !StringUtils.hasText(version))
// 				|| (StringUtils.hasText(groupId)
// 				&& StringUtils.hasText(artifactId)
// 				&& StringUtils.hasText(version)))) {
// 			throw new InvalidInitializrMetadataException("Custom maven pom "
// 					+ "requires groupId, artifactId and version");
// 		}
// 	}
// 
// }


// Path: src/main/java/com/edorasware/one/initializr/generator/ProjectGenerator.java
import com.edorasware.one.initializr.InitializrException;
import com.edorasware.one.initializr.metadata.*;
import com.edorasware.one.initializr.metadata.InitializrConfiguration.Env.Maven.ParentPom;
import com.edorasware.one.initializr.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.util.Assert;
import org.springframework.util.FileSystemUtils;
import org.springframework.util.StreamUtils;
import java.beans.PropertyDescriptor;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.*;
import java.util.stream.Collectors;

		write(new File(dir, ".gitignore"), "gitignore.tmpl", model);
	}

	/**
	 * Resolve the specified {@link ProjectRequest} and return the model to use to
	 * generate the project
	 * @param originalRequest the request to handle
	 * @return a model for that request
	 */
	protected Map<String, Object> resolveModel(ProjectRequest originalRequest) {
		Assert.notNull(originalRequest.getEdorasoneVersion(), "edorasone version must not be null");
		Map<String, Object> model = new LinkedHashMap<>();
		InitializrMetadata metadata = metadataProvider.get();

		ProjectRequest request = requestResolver.resolve(originalRequest, metadata);

		// request resolved so we can log what has been requested
		List<Dependency> dependencies = request.getResolvedDependencies();
		List<String> dependencyIds = dependencies.stream().map(Dependency::getId)
				.collect(Collectors.toList());
		log.info("Processing request{type=" + request.getType() + ", dependencies="
				+ dependencyIds);

		if (isWar(request)) {
			model.put("war", true);
		}

		if (isMavenBuild(request)) {
			model.put("mavenBuild", true);

			ParentPom parentPom = null;