My situation: I have a java project in eclipse. I have recently added the Maven plugin to my eclipse IDE.
In order for Maven to export my .jar, I have to right click my project > run as > Maven Clean. Then I have to right click my project > Maven > update project. Then I have to right click my project > run as > Maven install. Must be done in this order and skipping the middle step will produce errors with no successful .jar file.
So my first question is can I automate this within eclipse? If not, can I simplify this process?
My second question is, can I specify the destination folder of that exported .jar to anywhere on my computer?
So for instance Maven normally exports the .jar to D:\${eclipse.workspace}\${project.name}\target\
but I would like to export it to D:\Programs\
. Once again, this must be done from within eclipse. It would be preferable if the solution could simply make a copy from \target\
to \programs
or have a second directory output.
I've briefly (as in spent the better part of my day) looked at pom.xml configurations and Ant build tool but am not sure if I'm chasing a dead end.
Appreciate any and all help given!