complete classpath imports

Fixes GROOVY-6074
Apply after #178, and #177 (else merging this discards #177)