我想在test_spring_web中加入test_spring_service项目的jar包,test_spring_service已在本地仓库中存在,为什么还会报出Invalid classpath publish/export dependency /mvn_service. Project entries not supported.的错误?
不要动eclipse.在控制台执行:mvn eclipse:eclipse,然后刷新eclipse的项目试试.再不行就在pom中的plugins节点内加:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.9</version> <configuration> <additionalProjectnatures> <projectnature>org.eclipse.jdt.core.javanature</projectnature> <!-- <projectnature>org.eclipse.m2e.core.maven2Nature</projectnature> <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature> --> </additionalProjectnatures> <additionalBuildcommands> <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand> <!-- <buildcommand>org.eclipse.m2e.core.maven2Builder</buildcommand> <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand> --> </additionalBuildcommands> </configuration> </plugin>
然后再
mvn eclipse:clean
mvn eclipse:eclipse
一般的eclipse的项目空间有.project和.classpath两个文件.执行eclipse:eclipse就是让maven的eclipse插件把.classpath内的jar引用地址重新更新一遍. eclipse:clean就是删除所有eclipse项目文件在用eclipse:eclipse重建
当然,上面的是复制别人的。
我的解决方案是:
是否所依赖的包是最新的包?
所以先更新该包。
然后Project celan