# EclipseWtp

API Documentation: | `EclipseWtp`

Generates Eclipse configuration files for Eclipse WTP.

### Properties

Property | Description
`contextPath` | The context path for the web application
`deployName` | The deploy name to be used in the org.eclipse.wst.common.component file.
`facets` | The facets to be added as installed elements to the org.eclipse.wst.common.project.facet.core file.
`minusConfigurations` | The configurations which files are to be excluded from the dependent-module elements of the org.eclipse.wst.common.component file.
`orgEclipseWstCommonComponentInputFile` | The file that is merged into the to be produced org.eclipse.wst.common.component file. This file must not exist.
`orgEclipseWstCommonComponentOutputFile` | The output file for the org.eclipse.wst.common.component metadata.
`orgEclipseWstCommonProjectFacetCoreInputFile` | The file that is merged into the to be produced org.eclipse.wst.common.project.facet.core file. This file must not exist.
`orgEclipseWstCommonProjectFacetCoreOutputFile` | The output file for the org.eclipse.wst.common.project.facet.core metadata.
`plusConfigurations` | The configurations which files are to be transformed into dependent-module elements of the org.eclipse.wst.common.component file.
`properties` | Additional property elements.
`resources` | Additional wb-resource elements.
`sourceSets` | The source sets to be transformed into wb-resource elements.
`variables` | The variables to be used for replacing absolute path in dependent-module elements of the org.eclipse.wst.common.component file.

### Property details

#### `String` `contextPath`

The context path for the web application

Default with `eclipse` and `war` plugins:
  `project.war.baseName`

#### `String` `deployName`

The deploy name to be used in the org.eclipse.wst.common.component file.

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

#### ``List`<`Facet`>` `facets`

The facets to be added as installed elements to the org.eclipse.wst.common.project.facet.core file.

Default with `eclipse` and `war` plugins:
  Java and web facets.

#### ``Set`<`Configuration`>` `minusConfigurations`

The configurations which files are to be excluded from the dependent-module elements of the org.eclipse.wst.common.component file.

Default with `eclipse` and `war` plugins:
  `[project.configurations.providedRuntime]`

#### `File` `orgEclipseWstCommonComponentInputFile`

The file that is merged into the to be produced org.eclipse.wst.common.component file. This file must not exist.

#### `File` `orgEclipseWstCommonComponentOutputFile`

The output file for the org.eclipse.wst.common.component metadata.

Default with `eclipse` and `war` plugins:
  ``${project.projectDir}`/.settings/org.eclipse.wst.common.component`

#### `File` `orgEclipseWstCommonProjectFacetCoreInputFile`

The file that is merged into the to be produced org.eclipse.wst.common.project.facet.core file. This file must not exist.

#### `File` `orgEclipseWstCommonProjectFacetCoreOutputFile`

The output file for the org.eclipse.wst.common.project.facet.core metadata.

Default with `eclipse` and `war` plugins:
  ``${project.projectDir}`/.settings/org.eclipse.wst.common.project.facet.core.xml`

#### ``Set`<`Configuration`>` `plusConfigurations`

The configurations which files are to be transformed into dependent-module elements of the org.eclipse.wst.common.component file.

Default with `eclipse` and `war` plugins:
  `[project.configurations.runtime]`

#### ``List`<`WbProperty`>` `properties`

Additional property elements.

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

#### ``List`<`WbResource`>` `resources`

Additional wb-resource elements.

Default with `eclipse` and `war` plugins:
  `[deployPath: '/', sourcePath: project.webAppDirName]`

#### ``Iterable`<`SourceSet`>` `sourceSets`

The source sets to be transformed into wb-resource elements.

Default with `eclipse` and `war` plugins:
  `[project.sourceSets.main]`

#### ``Map`<`String`, `File`>` `variables`

The variables to be used for replacing absolute path in dependent-module elements of the org.eclipse.wst.common.component file.

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

### Script blocks

No script blocks

### Methods

Method | Description
`beforeConfigured(closure)` | Adds a closure to be called when the model has been loaded from the input files, and before this task has configured the model.
`facet(args)` | Adds a facet for the org.eclipse.wst.common.project.facet.core file.
`property(args)` | Adds a property to be added to the org.eclipse.wst.common.component file.
`resource(args)` | Adds a wb-resource to be added to the org.eclipse.wst.common.component file.
`variables(variables)` | Adds variables to be used for replacing absolute path in dependent-module elements of the org.eclipse.wst.common.component file.
`whenConfigured(closure)` | Adds a closure to be called after this task has configured model, and before it generates the XML content for the files.
`withXml(closure)` | Adds a closure to be called when the XML content for each file has been generated, but before the content is written to the file.

### Method details

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

Adds a closure to be called when the model has been loaded from the input files, and before this task has configured the model.

#### `void` `facet`(``Map`<`String`, ?>` args)

Adds a facet for the org.eclipse.wst.common.project.facet.core file.

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

Adds a property to be added to the org.eclipse.wst.common.component file.

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

Adds a wb-resource to be added to the org.eclipse.wst.common.component file.

#### `void` `variables`(``Map`<`String`, `File`>` variables)

Adds variables to be used for replacing absolute path in dependent-module elements of the org.eclipse.wst.common.component file.

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

Adds a closure to be called after this task has configured model, and before it generates the XML content for the files.

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

Adds a closure to be called when the XML content for each file has been generated, but before the content is written to the file.