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

net.sf.debianmaven.utils.DefaultFileCopy Maven / Gradle / Ivy

Go to download

This plugin helps building DEB packages from Maven projects. The packages can be used in DEB-based operating systems such as Debian and Ubuntu. The plugin uses external Debian tools to do the actual packaging. Fork of: http://debian-maven.sourceforge.net

The newest version!
/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see .
 */

/*
 * DefaultFileCopy.java
 * Copyright (C) 2019 University of Waikato, Hamilton, NZ
 */

package net.sf.debianmaven.utils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;

/**
 * Performs verbatim copying of files.
 */
public class DefaultFileCopy extends AbstractFileCopy
{

	/**
	 * Copies input file to output file.
	 *
	 * @param input the input file
	 * @param output the output file
	 * @throws IOException if copying fails
	 */
	public void copy(Path input, Path output) throws IOException
	{
		getLog().debug("Copying: " + input);
		Files.createDirectories(output.getParent());
		Files.copy(input, output, StandardCopyOption.REPLACE_EXISTING);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy