I’ve got m2eclipse plugin installed and there’s no problem syncing compile time dependencies that appear in pom.xml.
Now, I add JPA + Hibernate(or whatever) dependency that maven catches up just fine when doing mvn jetty:run.
The problem is, Eclipse doesn’t. So I don’t get those extra .jars deployed on the referenced tomcat when I launch the web app from eclipse.
Is there a way to add this kind of web runtime dependencies to Eclipse? Don’t really like the idea of manually editing org.eclipse.wst.common.component.
I have found that any time you update a project’s POM it helps to rerun m2eclipse or it will not see the new external dependencies.
If you have not tried to run this since you added your new dependencies ( JPA + Hibernate or whatever ) to your POM then give it a shot and see if it works.
Please note that after you execute this, you will probably need to refresh your Eclipse projects for the changes to take effect.
It might not require all of these arguments to work, but I sort of added them all at one point just to make certain. You can tweak the list of arguments to get it to the point that it works for you.
Doing this may blow away some of your Eclipse preferences for your project, so hopefully you have everything needed to rebuild your project already in your POM. For instance, I have a bunch of extra things in one of my POMs to ensure that things like springnature and springbuilder are added to my eclipse project when maven is used to rebuild the eclipse project.
This last bit was added as a warning! Would hate for someone to take a working Eclipse project and destroy a bunch of the configuration if they were not already prepared for the consequences of running the eclipse:* commands.