Issue
I have a general tools jar file which access MySQL. When I looked at the jar file, I saw it had about 11 Mb comprising MySQL and ProtoBuf, while my own code is about .5 Mb. The MySQL is only used by a couple of my tools, so I would like to download the MySQL stuff, and use reflection for the MySQL functions.
The reflection code is now working, but the MySQL jar file location and version number has to be hard-coded. It is also Eclipse-dependent (.m2
). What I would like to do is always download the latest version of MySQL, and use that. I think I can use Maven functions to download the latest version number, but I'm not sure where to go from there! Someone suggested Aether - is that still active?
TIA
Solution
I have a working solution using Curl to acess information from Maven - twice: once to figure out the latest version of mysql-connector-java (the jar file), and one to download it. It works, but I agree with @Taylor 's point, and will see if I can come up with a non-reflection solution. I will however close this question.
Answered By - Paul Morrison
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)