I am using maven and JavaFX Maven Plugin. Maven will download jar from repository and save it to ~/.m2 directory. But if I use maven as sudo. For example, if I type sudo mvn com.zenjava:javafx-maven-plugin:2.0:fix-classpath
, is there any difference with the command without sudo? Does maven download the plugin and save it to ~/.m2 as well?
I ask this question because I run this command both under sudo and no-sudo. It seems maven will re-download the plugin each time.
I think your question is related to this one.
So the answer to your question, would be if you are not changing the home directory while executing sudo, maven will download plugins to your user .m2 directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With