I probed the ant Script task code. It does nothing much with the
classpaths. It just loads those in the classloader but how it does so is
unclear. Ant has its own classpath utils and uses some from plexus. I also
read this https://maven.apache.org/guides/mini/guide-maven-classloading.html.
Overall, I think the need is to just load the classpaths in the
classloader. The maven docs say this but are not very descriptive of the
process. The docs do refer to Plexus Classworlds. I'll look into it. I'll
try to see if I can view what are the classpaths antrun used in the earlier
build process which may throw some light on what is missing in our
classloader.
Regards,
Kartik.