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

net.sf.debianmaven.LogOutputStream 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.

The newest version!
package net.sf.debianmaven;

import java.io.IOException;
import java.io.OutputStream;

import org.apache.maven.plugin.logging.Log;

public class LogOutputStream extends OutputStream
{
	private final Log backend;
	private StringBuffer buffer = new StringBuffer();
	
	public LogOutputStream(Log backend)
	{
		this.backend = backend;
	}

	@Override
	public void write(int ch) throws IOException
	{
		if ((char)ch == '\n')
		{
			backend.warn(buffer.toString());
			buffer.setLength(0);
		}
		else
			buffer.append((char)ch);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy