0

I am trying to get a simple "Hello, Gant!" Gant build up and running. I just downloaded & extracted the 1.9.10-Groovy-2.0.0 version and am trying to create a build that defines a single greet task. When greet executes, it prints a "Hello, Gant!" message to STDOUT.

Specific questions:

  • How do I "install" Gant? Do I need to define any env vars, like GANT_HOME, and then put %GANT_HOME%\bin on the system Path, etc.?
  • What do I name my Gant buildscript? Anything I like, such as HelloGant.groovy?
  • How do I run a greet task, defined in HelloGant.groovy, from the command-line?
AdjustingForInflation
  • 1,571
  • 2
  • 26
  • 50
  • FYI - none of these questions are answered on the Gant website, or in the downloaded ZIP's `README`. – AdjustingForInflation Apr 10 '14 at 18:47
  • [Installation Guide](https://github.com/Gant/Gant/blob/master/README_Install.txt) and [examples](https://github.com/Gant/Gant/tree/master/examples/testScripts). – dmahapatro Apr 11 '14 at 02:04

1 Answers1

1

re: install. Yes, the install is typical. Define GANT_HOME and place GANT_HOME/bin in PATH

The typical Gant build file is build.gant. Here is an example that is not the default:

$ cat HelloGant.groovy 

target ('greet' : 'greet') {
    println "hi there"
}

Here is an example execution:

$ gant -f HelloGant.groovy greet
greet:
hi there
------ greet

BUILD SUCCESSFUL
Total time: 1.52 seconds
Michael Easter
  • 23,733
  • 7
  • 76
  • 107