anchor.diff:  *Example:*
   
   [source,xml]
  -----
  -<groovyc srcdir="src" destdir="target/classes">
  -</groovyc>
  -----
  +-----------------------------------------------------------------------
  +<path id="classpath.main">
  +  <fileset dir="${groovy.libs}" includes="*.jar" excludes="groovy-ant-*.jar"/>
  +  ...
  +</path>
  +<groovyc srcdir="${dir.sources}" destdir="${dir.classes}" classpathref="classpath.main"
  +         fork="true" includeantruntime="false" configscript="config.groovy" targetBytecode="1.8"/>
  +-----------------------------------------------------------------------
   
   
   [[ThegroovycAntTask-groovycNestedElements]]
  
positive.code: |==========================================================
  |element |kind |Required |Replaces Attribute
  |src |a path structure |Yes (unless srcdir is used) |srcdir
  |classpath |a path structure |No |classpath
  |javac |javac task |No |jointCompilationOptions
  |==========================================================
  
  *Notes:*
  
  * For path structures see for example
  http://ant.apache.org/manual/using.html#path
  * For usages of the javac task see
  https://ant.apache.org/manual/Tasks/javac.html
  * The nested javac task behaves more or less as documented for the
  top-level `javac` task. `srcdir`, `destdir`, `classpath`, `encoding` for the
  nested `javac` task are taken from the enclosing `groovyc` task. If these
  attributes are specified then they are added, they do not replace. In
  fact, you should not attempt to overwrite the destination. Other
  attributes and nested elements are unaffected, for example `fork`,
  `memoryMaximumSize`, etc. may be used freely.
  
  [[ThegroovycAntTask-JointCompilation]]
  Joint Compilation
  ^^^^^^^^^^^^^^^^^
  
  Joint compilation is enabled by using an embedded `javac` element, as shown in
  the following example:
  
  [source,xml]
  ----
  <groovyc srcdir="${testSourceDirectory}" destdir="${testClassesDirectory}">
    <classpath>
      <pathelement path="${mainClassesDirectory}"/>
      <pathelement path="${testClassesDirectory}"/>
      <path refid="testPath"/>
    </classpath>
    <javac source="1.7" target="1.7" debug="on" />
  </groovyc>
  ----
  
  It is rare to specify `srcdir` and `destdir`, the nested `javac` task is provided with the `srcdir`
  and `destdir` values from the enclosing `groovyc` task, and it is invariable
  the right thing to do just to leave this as is.
  To restate: the `javac` task gets the `srcdir`, `destdir` and `classpath` from
  the enclosing `groovyc` task.
  
  More details about joint compilation can be found in the <<section-jointcompilation,joint compilation>> section.
  
  
negative.code: Required taskdef
  ^^^^^^^^^^^^^^^^
  
  Assuming the groovy jars are in _groovy.libs_, you will need to declare this task
  at some point in the `build.xml` prior to the `groovyc` task being invoked.
  
  [source,xml]
  -----------------------------------------------------------------------
  <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
    <classpath>
      <fileset file="${groovy.libs}/groovy-ant-VERSION.jar"/>
      <fileset file="${groovy.libs}/groovy-VERSION.jar"/>
    </classpath>
  </taskdef>
  -----------------------------------------------------------------------
  
  [[ThegroovycAntTask-groovycAttributes]]
  <groovyc> Attributes
  