# EclipseProject

API Documentation: | `EclipseProject`

Generates an Eclipse `.project` file.

### Properties

Property | Description
`buildCommands` | The build commands to be added to this Eclipse project.
`comment` | A comment used for the eclipse project
`inputFile` | The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration.
`links` | The links to be added to this Eclipse project.
`natures` | The natures to be added to this Eclipse project.
`outputFile` | The output file to write the final configuration to.
`projectName` | The name used for the name of the eclipse project
`referencedProjects` | The referenced projects of this Eclipse project.

### Property details

#### ``List`<`BuildCommand`>` `buildCommands`

The build commands to be added to this Eclipse project.

Default with `eclipse` and `java` plugins:
  Java builder, plus Scala and Web builders as appropriate.

#### `String` `comment`

A comment used for the eclipse project

Default with `eclipse` and `java` plugins:
  `project.description`

#### `File` `inputFile`

The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration.

#### ``Set`<`Link`>` `links`

The links to be added to this Eclipse project.

Default with `eclipse` and `java` plugins:
  []

#### ``List`<`String`>` `natures`

The natures to be added to this Eclipse project.

Default with `eclipse` and `java` plugins:
  Java nature, plus Groovy, Scala and Web natures as appropriate.

#### `File` `outputFile`

The output file to write the final configuration to.

Default with `eclipse` and `java` plugins:
  ``${project.projectDir}`/.project`

#### `String` `projectName`

The name used for the name of the eclipse project

Default with `eclipse` and `java` plugins:
  `project.name`

#### ``Set`<`String`>` `referencedProjects`

The referenced projects of this Eclipse project.

Default with `eclipse` and `java` plugins:
  []

### Script blocks

No script blocks

### Methods

Method | Description
`beforeConfigured(closure)` | Adds a closure to be called before the domain object is configured by this task. The domain object is passed as a parameter to the closure.
`beforeConfigured(action)` | Adds an action to be called before the domain object is configured by this task. The domain object is passed as a parameter to the action.
`buildCommand(buildCommand)` | Adds a build command to the eclipse project.
`buildCommand(args, buildCommand)` | Adds a build command with arguments to the eclipse project.
`link(args)` | Adds a link to the eclipse project.
`natures(natures)` | Adds natures entries to the eclipse project.
`referencedProjects(referencedProjects)` | Adds project references to the eclipse project.
`whenConfigured(closure)` | Adds a closure to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the closure.
`whenConfigured(action)` | Adds an action to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the action.
`withXml(closure)` | Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a parameter in form of a `XmlProvider`. The closure can modify the XML before it is written to the output file.
`withXml(action)` | Adds an action to be called when the XML document has been created. The XML is passed to the action as a parameter in form of a `XmlProvider`. The action can modify the XML before it is written to the output file.

### Method details

#### `void` `beforeConfigured`(`Closure` closure)

Adds a closure to be called before the domain object is configured by this task. The domain object is passed as a parameter to the closure.

The closure is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.

#### `void` `beforeConfigured`(``Action`<? super `T`>` action)

Adds an action to be called before the domain object is configured by this task. The domain object is passed as a parameter to the action.

The action is executed after the domain object has been loaded from the input file. Using this method allows you to change the domain object in some way before the task configures it.

#### `void` `buildCommand`(`String` buildCommand)

Adds a build command to the eclipse project.

#### `void` `buildCommand`(`Map` args, `String` buildCommand)

Adds a build command with arguments to the eclipse project.

#### `void` `link`(``Map`<`String`, `String`>` args)

Adds a link to the eclipse project.

#### `void` `natures`(``String`...` natures)

Adds natures entries to the eclipse project.

#### `void` `referencedProjects`(``String`...` referencedProjects)

Adds project references to the eclipse project.

#### `void` `whenConfigured`(`Closure` closure)

Adds a closure to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the closure.

The closure is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.

#### `void` `whenConfigured`(``Action`<? super `T`>` action)

Adds an action to be called after the domain object has been configured by this task. The domain object is passed as a parameter to the action.

The action is executed just before the domain object is written to the output file. Using this method allows you to override the configuration applied by this task.

#### `void` `withXml`(`Closure` closure)

Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a parameter in form of a `XmlProvider`. The closure can modify the XML before it is written to the output file.

#### `void` `withXml`(``Action`<? super `XmlProvider`>` action)

Adds an action to be called when the XML document has been created. The XML is passed to the action as a parameter in form of a `XmlProvider`. The action can modify the XML before it is written to the output file.