Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.gradle.plugins.eclipse
[Groovy] Class EclipseClasspath

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.plugins.eclipse.AbstractXmlGeneratorTask
              org.gradle.plugins.eclipse.EclipseClasspath

    class EclipseClasspath
    extends AbstractXmlGeneratorTask

Generates an Eclipse .classpath file.

Authors:
  Hans Dockter

Field Summary
`protected ModelFactory` | `modelFactory`
`protected XmlTransformer` | `withXmlActions`

Property Summary
`java.util.Set` | `containers` Containers to be added to the classpath
`boolean` | `downloadJavadoc` Whether to download and add javadocs associated with the dependency jars.
`boolean` | `downloadSources` Whether to download and add sources associated with the dependency jars.
`java.io.File` | `inputFile` The file that is merged into the to be produced classpath file.
`java.util.Set` | `minusConfigurations` The configurations which files are to be excluded from the classpath entries.
`java.io.File` | `outputFile`
`java.util.Set` | `plusConfigurations` The configurations which files are to be transformed into classpath entries.
`NamedDomainObjectContainer` | `sourceSets` The output file where to generate the classpath to.
`java.util.Map` | `variables` The variables to be used for replacing absolute paths in classpath entries.

Constructor Summary
`EclipseClasspath()`

Method Summary
`void` | `containers(java.lang.String containers)` Adds containers to the .classpath.
`void` | `generateXml()`
`void` | `variables(java.util.Map variables)` Adds variables to be used for replacing absolute paths in classpath entries.
`void` | `withXml(groovy.lang.Closure closure)` Adds a closure to be called when the .classpath XML has been created.
`void` | `withXml(Action action)` Adds an action to be called when the .classpath XML has been created.

Methods inherited from class AbstractXmlGeneratorTask
beforeConfigured, whenConfigured

Field Detail

### modelFactory

    protected ModelFactory modelFactory

### withXmlActions

    protected XmlTransformer withXmlActions

Property Detail

### containers

    java.util.Set containers

  Containers to be added to the classpath

### downloadJavadoc

    boolean downloadJavadoc

  Whether to download and add javadocs associated with the dependency jars. Defaults to false.

### downloadSources

    boolean downloadSources

  Whether to download and add sources associated with the dependency jars. Defaults to true.

### inputFile

    java.io.File inputFile

  The file that is merged into the to be produced classpath file. This file must not exist.

### minusConfigurations

    java.util.Set minusConfigurations

  The configurations which files are to be excluded from the classpath entries.

### outputFile

    @OutputFile
        /**
         * The output file where to generate the classpath to.
         */
    java.io.File outputFile

### plusConfigurations

    java.util.Set plusConfigurations

  The configurations which files are to be transformed into classpath entries.

### sourceSets

    NamedDomainObjectContainer sourceSets

  The output file where to generate the classpath to.

### variables

    java.util.Map variables

  The variables to be used for replacing absolute paths in classpath entries.

Constructor Detail

### EclipseClasspath

    EclipseClasspath()

Method Detail

### containers

    void containers(java.lang.String containers)

  Adds containers to the .classpath.
  Parameters:
    `containers` - the container names to be added to the .classpath.

### generateXml

    @TaskAction
    void generateXml()

### variables

    void variables(java.util.Map variables)

  Adds variables to be used for replacing absolute paths in classpath entries.
  Parameters:
    `variables` - A map where the keys are the variable names and the values are the variable values.

### withXml

    void withXml(groovy.lang.Closure closure)

  Adds a closure to be called when the .classpath XML has been created. The XML is passed to the closure as a parameter in form of a XmlProvider. The closure can modify the XML.
  Parameters:
    `closure` - The closure to execute when the .classpath XML has been created.

### withXml

    void withXml(Action action)

  Adds an action to be called when the .classpath XML has been created. The XML is passed to the action as a parameter in form of a XmlProvider. The action can modify the XML.
  Parameters:
    `action` - The action to execute when the .classpath XML has been created.

Groovy Documentation