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

aQute.bnd.ant.ReleaseTask Maven / Gradle / Ivy

Go to download

A command line utility and Ant plugin to wrap, build, or examine bundles.

There is a newer version: 2.4.0
Show newest version
package aQute.bnd.ant;

import org.apache.tools.ant.*;

import aQute.bnd.build.*;
import aQute.bnd.build.Project;

/**
 * 

* ANT task to release into a repository, equivalent to: * <bnd command="release"/> *

*

* To release into the default repository (defined by * -releaserepo in build.bnd): *

* *
 *    <bndrelease/>
 * 
*

* To release into a specific named repository: * *

 *    <bndrelease releaserepo="My Repository"/>
 * 
* * @author Neil Bartlett * @see {@link BndTask} for setup instructions. */ public class ReleaseTask extends BaseTask { String releaseRepo = null; @Override public void execute() throws BuildException { try { Project project = Workspace.getProject(getProject().getBaseDir()); if (releaseRepo == null) { project.release(false); } else { project.release(releaseRepo); } if (report(project)) throw new BuildException("Release failed"); } catch (Exception e) { e.printStackTrace(); throw new BuildException(e); } } public void setReleaserepo(String releaseRepo) { this.releaseRepo = releaseRepo; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy