// Path: humantask-maven-plugin/src/main/java/org/wso2/maven/humantask/artifact/HumanTaskPluginConstants.java
// public class HumanTaskPluginConstants {
// 
//     public static final String TARGET_FOLDER_NAME = "target";
// 
//     public static final String HUMANTASK_DATA_FOLDER_NAME = "ht-tmp";
// 
//     public static final String ERROR_CREATING_CORRESPONDING_ZIP_FILE = "Error creating corresponding ZIP file";
// 
//     public static final String HUMANTASK_EXTENSION = ".ht";
// 
//     public static final String EMPTY_STRING = "";
// }


import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.wso2.maven.humantask.artifact.HumanTaskPluginConstants;
/*
 * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.wso2.maven.humantask.artifact.util;



public class FileManagementUtils {

	private static final Logger logger = Logger.getLogger(FileManagementUtils.class);

	/**
	 * Creates the humantask archive for the artifact
	 * @param location
	 * @param artifactLocation
	 * @param artifactName
	 * @return created humantask archive file
	 * @throws Exception
	 */
	public static File createArchive(File location, File artifactLocation, String artifactName)
			throws Exception {
		File targetFolder;
// Path: humantask-maven-plugin/src/main/java/org/wso2/maven/humantask/artifact/HumanTaskPluginConstants.java
// public class HumanTaskPluginConstants {
// 
//     public static final String TARGET_FOLDER_NAME = "target";
// 
//     public static final String HUMANTASK_DATA_FOLDER_NAME = "ht-tmp";
// 
//     public static final String ERROR_CREATING_CORRESPONDING_ZIP_FILE = "Error creating corresponding ZIP file";
// 
//     public static final String HUMANTASK_EXTENSION = ".ht";
// 
//     public static final String EMPTY_STRING = "";
// }


// Path: humantask-maven-plugin/src/main/java/org/wso2/maven/humantask/artifact/util/FileManagementUtils.java
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.wso2.maven.humantask.artifact.HumanTaskPluginConstants;

/*
 * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.wso2.maven.humantask.artifact.util;



public class FileManagementUtils {

	private static final Logger logger = Logger.getLogger(FileManagementUtils.class);

	/**
	 * Creates the humantask archive for the artifact
	 * @param location
	 * @param artifactLocation
	 * @param artifactName
	 * @return created humantask archive file
	 * @throws Exception
	 */
	public static File createArchive(File location, File artifactLocation, String artifactName)
			throws Exception {
		File targetFolder;
		targetFolder = new File(location.getPath(), HumanTaskPluginConstants.TARGET_FOLDER_NAME);