org.mashupbots.socko.buildtools

Builder

case class Builder(commandLine: String, directoryToWatch: String, watchRecursively: Boolean = true, eventDelayTimeout: Int = 100) extends Logger with Product with Serializable

Watches a directory and if there is a change, the build is run.

A new thread is created for watching and building.

Usage

// Start watching and building
val builder = new Builder("internal-ant /my-project/build.xml build", "/my-project/src")

...

// Stop
builder.stop()
commandLine

Command line to run when a watched file changes. For example

ant -f /home/username/dev/project/build.xml js

There is a special command line to run ant internally within this VM rather than an external process in a new VM.

internal-ant [build-file] [target1] [target2] [target3] ...

This may execute your ant scripts faster because a new process does not have to be created.

However, there are limitations:

  • build-file must be the absolute path to the build file
  • build-file and target names cannot have spaces in them.
  • No other ant options are supported. If you wish to use advance ant options, just use the normal ant.
directoryToWatch

Full path to the directory to watch

watchRecursively

Indicates if we wish to watch files in sub-directories as well

eventDelayTimeout

Milliseconds to wait after an event for more events before a build is triggered. If we do not wait, multiple builds may be kicked off when saving a single file. Defaults to 100.

Linear Supertypes
Serializable, Serializable, Product, Equals, Logger, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Builder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Logger
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Builder(commandLine: String, directoryToWatch: String, watchRecursively: Boolean = true, eventDelayTimeout: Int = 100)

    commandLine

    Command line to run when a watched file changes. For example

    ant -f /home/username/dev/project/build.xml js

    There is a special command line to run ant internally within this VM rather than an external process in a new VM.

    internal-ant [build-file] [target1] [target2] [target3] ...

    This may execute your ant scripts faster because a new process does not have to be created.

    However, there are limitations:

    • build-file must be the absolute path to the build file
    • build-file and target names cannot have spaces in them.
    • No other ant options are supported. If you wish to use advance ant options, just use the normal ant.
    directoryToWatch

    Full path to the directory to watch

    watchRecursively

    Indicates if we wish to watch files in sub-directories as well

    eventDelayTimeout

    Milliseconds to wait after an event for more events before a build is triggered. If we do not wait, multiple builds may be kicked off when saving a single file. Defaults to 100.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val commandLine: String

    Command line to run when a watched file changes.

    Command line to run when a watched file changes. For example

    ant -f /home/username/dev/project/build.xml js

    There is a special command line to run ant internally within this VM rather than an external process in a new VM.

    internal-ant [build-file] [target1] [target2] [target3] ...

    This may execute your ant scripts faster because a new process does not have to be created.

    However, there are limitations:

    • build-file must be the absolute path to the build file
    • build-file and target names cannot have spaces in them.
    • No other ant options are supported. If you wish to use advance ant options, just use the normal ant.
  7. val directoryToWatch: String

    Full path to the directory to watch

  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. val eventDelayTimeout: Int

    Milliseconds to wait after an event for more events before a build is triggered.

    Milliseconds to wait after an event for more events before a build is triggered. If we do not wait, multiple builds may be kicked off when saving a single file. Defaults to 100.

  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def isAlive(): Boolean

    Indicates if thread is still running

    Indicates if thread is still running

    returns

    True if thread is still, false if not

  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. lazy val log: Logger

    Logger name is inferred from the class name.

    Logger name is inferred from the class name.

    Definition Classes
    Logger
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. def stop(): Unit

    Stop watching and building.

    Stop watching and building.

    The thread will be terminated by exiting of the run method.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. val watchRecursively: Boolean

    Indicates if we wish to watch files in sub-directories as well

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Logger

Inherited from AnyRef

Inherited from Any

Ungrouped