org.gradle.api.tasks.ide.eclipse
Class EclipseWtp

java.lang.Object
  extended by org.gradle.api.internal.AbstractTask
      extended by org.gradle.api.DefaultTask
          extended by org.gradle.api.internal.ConventionTask
              extended by org.gradle.api.tasks.ide.eclipse.EclipseWtp
All Implemented Interfaces:
groovy.lang.GroovyObject, java.lang.Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Task

public class EclipseWtp
extends org.gradle.api.internal.ConventionTask

Generates Eclipse configuration files for Eclipse WTP.


Field Summary
static java.lang.String WTP_FILE_DIR
           
static java.lang.String WTP_FILE_NAME
           
 
Fields inherited from interface org.gradle.api.Task
AUTOSKIP_PROPERTY_PREFIX, TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
 
Constructor Summary
EclipseWtp()
           
 
Method Summary
protected  void generateWtp()
           
 java.lang.Object getDeployName()
          Returns the deploy name for this project.
 java.lang.Object getOutputDirectory()
          Returns the java-output-path to be used by the wtp descriptor file.
 java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> getProjectDependencies()
          Returns the project dependencies to be transformed into eclipse project dependencies.
 java.util.List<java.lang.Object> getWarLibs()
          Returns a list with library paths to be deployed as war lib dependencies.
 java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getWarResourceMappings()
          Returns the war resource mappings
 boolean isFailForMissingDependencies()
          Returns whether the build should fail if lib dependencies intended to be used by this task can not be resolved.
 void setDeployName(java.lang.Object deployName)
          Set the deploy name for this project.
 void setFailForMissingDependencies(boolean failForMissingDependencies)
          Sets whether the build should fail if lib dependencies intended to be used by this task can not be resolved.
 void setOutputDirectory(java.lang.Object outputDirectory)
          Sets the java-output-path to be used by the wtp descriptor file.
 void setProjectDependencies(java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> projectDependencies)
          Sets the project dependencies to be transformed into eclipse project dependencies.
 void setWarLibs(java.util.List<java.lang.Object> warLibs)
          Sets a list with library paths to be deployed as war lib dependencies.
 void setWarResourceMappings(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> warResourceMappings)
          Maps a deploy-path to source-paths.
 
Methods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, getConventionMapping, setConventionMapping
 
Methods inherited from class org.gradle.api.DefaultTask
configure, doFirst, doLast, leftShift
 
Methods inherited from class org.gradle.api.internal.AbstractTask
captureStandardOutput, compareTo, defineProperty, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuted, getLogger, getName, getOutput, getPath, getProject, getStandardOutputCapture, getTaskDependencies, hashCode, hasProperty, injectIntoNextInstance, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setOutputHandler, setProject, setProperty, setStandardOutputCapture, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface groovy.lang.GroovyObject
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
 

Field Detail

WTP_FILE_DIR

public static final java.lang.String WTP_FILE_DIR
See Also:
Constant Field Values

WTP_FILE_NAME

public static final java.lang.String WTP_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

EclipseWtp

public EclipseWtp()
Method Detail

generateWtp

protected void generateWtp()

getOutputDirectory

public java.lang.Object getOutputDirectory()
Returns the java-output-path to be used by the wtp descriptor file.

See Also:
setOutputDirectory(Object)

setOutputDirectory

public void setOutputDirectory(java.lang.Object outputDirectory)
Sets the java-output-path to be used by the wtp descriptor file.

Parameters:
outputDirectory - An object which toString value is interpreted as a path.

getProjectDependencies

public java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> getProjectDependencies()
Returns the project dependencies to be transformed into eclipse project dependencies.

See Also:
setProjectDependencies(java.util.List)

setProjectDependencies

public void setProjectDependencies(java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> projectDependencies)
Sets the project dependencies to be transformed into eclipse project dependencies.

Parameters:
projectDependencies -

getWarLibs

public java.util.List<java.lang.Object> getWarLibs()
Returns a list with library paths to be deployed as war lib dependencies.

See Also:
setWarLibs(java.util.List)

setWarLibs

public void setWarLibs(java.util.List<java.lang.Object> warLibs)
Sets a list with library paths to be deployed as war lib dependencies.

Parameters:
warLibs - An list with objects which toString value is interpreted as a path

getWarResourceMappings

public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getWarResourceMappings()
Returns the war resource mappings

See Also:
setWarResourceMappings(java.util.Map)

setWarResourceMappings

public void setWarResourceMappings(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> warResourceMappings)
Maps a deploy-path to source-paths. The assigned source paths must be sub directories of the project root dir. The assigned source path may be described by an absolute or a relative path. A relative path is interpreted as relative to the project root dir. An absolute path is transformed into a relative path in the resulting eclipse file. If an absolute source path is not a sub directory of project root an exception is thrown.

Parameters:
warResourceMappings -

getDeployName

public java.lang.Object getDeployName()
Returns the deploy name for this project.

See Also:
setDeployName(Object)

setDeployName

public void setDeployName(java.lang.Object deployName)
Set the deploy name for this project.

Parameters:
deployName - An object which toString value is interpreted as a path.

isFailForMissingDependencies

public boolean isFailForMissingDependencies()
Returns whether the build should fail if lib dependencies intended to be used by this task can not be resolved.

See Also:
setFailForMissingDependencies(boolean)

setFailForMissingDependencies

public void setFailForMissingDependencies(boolean failForMissingDependencies)
Sets whether the build should fail if lib dependencies intended to be used by this task can not be resolved. It is important to note that this task does not do any resolve. The purpose of this property is to inform for example a plugin which configures this task. This plugin is supposed to make the build fail, if not all the dependencies it intends to assign to this task can be resolved.

Parameters:
failForMissingDependencies -