Hi, I hope it's OK to ask a newbie question about how to update a Maven built Eclipse project as I'm finding it very hard to get to grips with Maven and how it works.
I followed instructions in a book as to how to download and install a Maven project for Eclipse - mvn clean package and mvn eclipse:clean eclipse:eclipse and then create a new Eclipse project from the existing source.
I tried copying the new jar into the library folder where the other jars for the Eclipse plugin are stored and adding it to the build path of the project as an external jar (couldn't figure out how to get it in as part of the existing library) but it didn't work. Should I copy it to the Maven repository folder? Or do something with the short pom file that goes with the updated jar, like edit the original pom file on my system (which obviously covers a whole bunch of other jars) to add stuff from the short pom file, and if so which bits of the file? And how do I get Eclipse to recognise the new jar instead of the older version, will deleting the old jar from the filesystem be enough?
Any help would be very much appreciated. Thanks in advance.
Probably the Number 1 selling point of Maven is that it fetches and caches dependencies for you. You don't have to download the updated JAR, just update the version number of the JAR in your Maven POM file and do a clean and rebuild. When you do that, Maven will check your local repository (cache) and, if the jar hasn't already been downloaded, it will go to the maven repositories, find a copy, and download it (this is assuming you didn't do an offline build!). Then it will use that copy to do your new build with.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Thank you for your replies. I've found the POM file and will edit it.
I'm new to this so I'll just have to go figure out how to do a clean and rebuild - if you'll forgive that it's so basic, am I right in thinking that you go to the directory where the edited POM file is and do mvn clean then mvn install, please?