## org.apache.tools.ant.taskdefs.optional
Class Rpm

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.optional.Rpm

public class Rpm
extends Task

Invokes the rpm tool to build a Linux installation file.

Author:
  lucas@collab.net

Field Summary

Fields inherited from class org.apache.tools.ant.Task
`description, location, target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`project`

Constructor Summary
`Rpm()`

Method Summary
`void` `execute()` Called by the project to let the task do its work.
`void` `setCleanBuildDir(boolean cbd)` Flag (optional, default=false) to remove the generated files in the BUILD directory
`void` `setCommand(java.lang.String c)` What command to issue to the rpm tool; optional.
`void` `setError(java.io.File error)` Optional file to save stderr to
`void` `setOutput(java.io.File output)` Optional file to save stdout to.
`void` `setRemoveSource(boolean rs)` Flag (optional, default=false) to remove the sources after the build.
`void` `setRemoveSpec(boolean rs)` Flag (optional, default=false) to remove the spec file from SPECS
`void` `setSpecFile(java.lang.String sf)` The name of the spec File to use; required.
`void` `setTopDir(java.io.File td)` The directory which will have the expected subdirectories, SPECS, SOURCES, BUILD, SRPMS ; optional.

Methods inherited from class org.apache.tools.ant.Task
`getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`getProject, setProject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Rpm

    public Rpm()

Method Detail

### execute

    public void execute()
                 throws BuildException

  Description copied from class: `Task`
  Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - if something goes wrong with the build

### setTopDir

    public void setTopDir(java.io.File td)

  The directory which will have the expected subdirectories, SPECS, SOURCES, BUILD, SRPMS ; optional. If this isn't specified, the `baseDir` value is used

### setCommand

    public void setCommand(java.lang.String c)

  What command to issue to the rpm tool; optional. The default is "-bb"

### setSpecFile

    public void setSpecFile(java.lang.String sf)

  The name of the spec File to use; required.

### setCleanBuildDir

    public void setCleanBuildDir(boolean cbd)

  Flag (optional, default=false) to remove the generated files in the BUILD directory

### setRemoveSpec

    public void setRemoveSpec(boolean rs)

  Flag (optional, default=false) to remove the spec file from SPECS

### setRemoveSource

    public void setRemoveSource(boolean rs)

  Flag (optional, default=false) to remove the sources after the build. See the the `--rmsource` option of rpmbuild.

### setOutput

    public void setOutput(java.io.File output)

  Optional file to save stdout to.

### setError

    public void setError(java.io.File error)

  Optional file to save stderr to

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.