net.sourceforge.tink.ant.PublishTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tink-ant Show documentation
Show all versions of tink-ant Show documentation
Tink tag library for integrating to Apache Ant build system.
The newest version!
/**
* Copyright 2008,2009 Ivan SZKIBA
*
* 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.
* under the License.
*/
package net.sourceforge.tink.ant;
import net.sourceforge.tink.model.Output;
import net.sourceforge.tink.model.TinkException;
import net.sourceforge.tink.model.helpers.PublisherBuilder;
import org.apache.tools.ant.BuildException;
import java.io.File;
import java.net.URI;
public class PublishTask extends AbstractTinkTask implements PublisherBuilder.Config
{
private File local;
private Output output;
private String password;
private URI remote;
private String user;
@Override public File getLocal()
{
return local;
}
public void setLocal(File value)
{
this.local = value;
}
@Override public Output getOutput()
{
return output;
}
@Override public String getPassword()
{
return password;
}
public void setPassword(String value)
{
this.password = value;
}
@Override public URI getRemote()
{
return remote;
}
public void setRemote(URI value)
{
this.remote = value;
}
@Override public String getUser()
{
return user;
}
public void setUser(String value)
{
this.user = value;
}
@Override public void execute() throws BuildException
{
output = new TaskOutput(this);
try
{
new PublisherBuilder(this).buildPublisher().execute();
}
catch (TinkException x)
{
throw new BuildException(x.getMessage(), x);
}
}
}