如今咱們能夠把原來項目的包引用改爲使用maven的依賴庫了,作法很簡單,修改你項目的.classpath配置文件,把原來的包引用所有刪除,並加入maven的依賴引用,個人.classpath文件最後是這樣的,發出來爲你們作參考java
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre7"/>
<classpathentry kind="lib" path="target/classes"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>eclipse