Right, so the first step is to make your java project a maven one. There are already many well written articles on how to do so. Here is one that will guide you step by step in setting up maven in eclipse.
Once you get to the part of setting up
pom.xml all you have to do is copy the following into the pom:
and that should resolve your issues.