public class BndTask extends BaseTask
This file is the bnd main task for ant.
To define the task library, load property from build.bnd and
prepare the workspace:
<target name="init" unless="initialized"> <taskdef
classpath="${path.to.bnd.jar}"
resource="aQute/bnd/ant/taskdef.properties"> <bndprepare
basedir="${projectdir}" print="false" top="${release.dir}"/> <property
name="initialized" value="set"/> </target>
To recursively build dependency projects, before building this project:
<target name="dependencies" depends="init" if="project.dependson"
unless="donotrecurse"> <subant target="build" inheritAll="false"
buildpath="${project.dependson}"> <property name="donotrecurse"
value="true"/> </subant> </target>
To build a bundle:
<target name="build" depends="compile"> <mkdir
dir="${target}"/> <bnd command="build" exceptions="true"
basedir="${project}"/> </target>
To pass properties into bnd from ANT:
<target name="build" depends="compile">
<mkdir dir="${target}"/> <bnd command="build" exceptions="true"
basedir="${project}"> <!-- Property will be set on the bnd Project:
--> <property name="foo" value="bar"/> <!-- Property will be set
on the bnd Workspace: --> <wsproperty name="foo" value="bar"/>
</bnd> </target>
DeployTask,
ReleaseTaskReporter.SetLocationReport.Location| Modifier and Type | Field and Description |
|---|---|
(package private) java.io.File |
basedir |
private org.apache.tools.ant.types.Path |
bndfilePath |
(package private) java.util.List<java.io.File> |
classpath |
private boolean |
classpathDirectlySet |
private org.apache.tools.ant.types.Path |
classpathReference |
(package private) java.lang.String |
command |
(package private) boolean |
eclipse |
(package private) static java.io.File[] |
EMPTY_FILES |
(package private) boolean |
exceptions |
(package private) boolean |
failok |
(package private) java.util.List<java.io.File> |
files |
(package private) boolean |
inherit |
(package private) java.io.File |
output |
(package private) boolean |
print |
(package private) java.util.List<java.io.File> |
sourcepath |
(package private) boolean |
test |
(package private) java.io.File |
testDir |
| Constructor and Description |
|---|
BndTask() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addAll(java.util.List<java.io.File> list,
java.lang.String files,
java.lang.String separator) |
void |
addBndfiles(org.apache.tools.ant.types.Path path) |
void |
addClasspath(org.apache.tools.ant.types.Path path) |
private void |
addFilesFrom(org.apache.tools.ant.types.Path path,
java.util.List<java.io.File> files) |
private void |
assertPathNotSet(org.apache.tools.ant.types.Path path,
java.lang.String message) |
private org.apache.tools.ant.types.Path |
createPath(org.apache.tools.ant.types.Reference r) |
void |
execute() |
private void |
executeBackwardCompatible() |
(package private) boolean |
isFailok() |
(package private) boolean |
isPrint() |
void |
setBasedir(java.io.File basedir)
Set the base directory of the project.
|
void |
setBndfilePath(org.apache.tools.ant.types.Reference reference) |
void |
setClasspath(java.lang.String value) |
void |
setClasspathref(org.apache.tools.ant.types.Reference reference) |
void |
setCommand(java.lang.String command) |
void |
setDestFile(java.io.File output) |
void |
setEclipse(boolean eclipse) |
void |
setFailok(boolean failok) |
void |
setFiles(java.lang.String files) |
void |
setInherit(boolean inherit) |
void |
setOutput(java.io.File output) |
(package private) void |
setPrint(boolean print) |
void |
setSourcepath(java.lang.String sourcepath) |
void |
setTestDir(java.io.File testDir) |
(package private) java.io.File[] |
toFiles(java.util.List<java.io.File> files,
java.lang.String what) |
private void |
updateBndFiles() |
private void |
updateClasspath() |
protected void |
validate()
validate required parameters before starting execution
|
addProperty, addWsproperty, error, exception, getErrors, getFile, getLocation, getWarnings, isExceptions, isOk, isPedantic, isTrace, join, progress, report, report, setExceptions, setPedantic, setTrace, split, trace, warningbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypejava.lang.String command
java.io.File basedir
boolean test
boolean failok
boolean exceptions
boolean print
private boolean classpathDirectlySet
private org.apache.tools.ant.types.Path classpathReference
private org.apache.tools.ant.types.Path bndfilePath
java.util.List<java.io.File> files
java.util.List<java.io.File> classpath
java.util.List<java.io.File> sourcepath
java.io.File output
java.io.File testDir
boolean eclipse
boolean inherit
static java.io.File[] EMPTY_FILES
public void execute()
throws org.apache.tools.ant.BuildException
execute in class org.apache.tools.ant.Taskorg.apache.tools.ant.BuildExceptionpublic void setCommand(java.lang.String command)
public void setBasedir(java.io.File basedir)
basedir - private void executeBackwardCompatible()
throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildExceptionpublic void setFiles(java.lang.String files)
void addAll(java.util.List<java.io.File> list,
java.lang.String files,
java.lang.String separator)
public void setClasspath(java.lang.String value)
public void setEclipse(boolean eclipse)
boolean isFailok()
public void setFailok(boolean failok)
boolean isPrint()
void setPrint(boolean print)
public void setSourcepath(java.lang.String sourcepath)
java.io.File[] toFiles(java.util.List<java.io.File> files,
java.lang.String what)
public void setOutput(java.io.File output)
public void setDestFile(java.io.File output)
public void setTestDir(java.io.File testDir)
public void setInherit(boolean inherit)
public void setClasspathref(org.apache.tools.ant.types.Reference reference)
public void setBndfilePath(org.apache.tools.ant.types.Reference reference)
public void addClasspath(org.apache.tools.ant.types.Path path)
public void addBndfiles(org.apache.tools.ant.types.Path path)
private org.apache.tools.ant.types.Path createPath(org.apache.tools.ant.types.Reference r)
private void assertPathNotSet(org.apache.tools.ant.types.Path path,
java.lang.String message)
protected void validate()
org.apache.tools.ant.BuildException - , if build is impossibleprivate void updateClasspath()
private void updateBndFiles()
private void addFilesFrom(org.apache.tools.ant.types.Path path,
java.util.List<java.io.File> files)