website-webapp导入eclipse发布过程
1 从svn那到website文件夹
2 去掉pom.xml里的<!—U*** --> 里的依赖
如果不去掉在发布到Tomcat时会出现一些包的冲突,例如:tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
3从cmd进入website/website-webapp文件夹
执行mvn eclipse: eclipse
4 把工程引入eclipse
5修改source路径
先删除website-webapp/src/main/webapp目录(要不然第六步进行不了),只保留红框里的四个。
修改成
website-webapp/src/main/webapp/WEB-INF/classes
其他的全部修改成:src/main/webapp/WEB-INF/classes
红框里的必须有
6把引入工程变成web工程
Myeclipse BUG 下面文件有乱码
<attribute name="webrootdir" value="<prjroot>" />
变成
<attribute name="webrootdir" value="/src/main/webapp" />
7拷贝struts.xml到Tomcat下
8发布Tomcat(如果不做5步则不能在这里发布)
我metadata启动报错,我自己删除掉后台依赖就好了。
删掉
src/main/resources/cms-config/spring下的所有-dao.xml和service.xml文件
删掉
services.xml
applicationContext.xml
applicationContext-resources.xml
applicationContext-test.xml