Menno wrote an article on using Maven to manage Java dependencies on Mendix modules. It uses Apache Ant as part of the process, so it may be of use.
https://medium.com/mendix/how-to-automate-dependency-management-in-mendix-using-maven-6af490512f79
Hope this helps.