unlike the ant documentation implies the javac task nested in groovyc means that sources, classpaths, destination and the encoding will be taken from the groovyc element. If you still specify sources or classpaths then they will be additional. You should not overwrite the destination, but you are free to choose a different encoding. Other attributes and nested elements are unaffected, for example fork and maxmem may be used freely.

Joint Compilation

Joint Compilation means that the groovy compilation will parse the groovy source files, create a stub of these, will use a java compilier to compile the stubs along with java sources and then continue compilation in the normal groovy compiler. This allows to mix java and groovy files freely in most cases.
To use joint compilation with the jointCompilation Attribute, you have to simulate the command line with compiler switches. -j will enable the joint compilation, every option with -F can be used for flags like nowarn (example -Fnowarn), options with values can be used with -J and an = like for example -Jtarget=1.4 -Jsource=1.4. Using the attribute means to use the javac compiler provided by sun. A complete value may look for example like this: "-j -Fnowarn -Jtarget=1.4 -J-source=1.4"
The other way is to use the javac nested element. You can there use any attribute or nested element javac allows as. The compiler used here will be the one ant selects. If you told ant to use for example jikes as java compiler, then this javac will use jikes too. If you use the nested javac element, you don't need to use the attribute. If you still use the attribute, its value will be ignored.