标准web工程在eclipse中利用m2eclipse插件添加依赖管理后,在部署过程中没有将依赖的jar包自动拷贝到/WEB-INF/lib中。
参考了一些朋友的做法手动执行
mvn dependency:copy-dependencies -DoutputDirectory=src/main/webapp/WEB-INF/lib -DincludeScope=runtime
命令将jar包拷贝到/WEB-INF/lib目录下。
这种做法固然可以,但是也会带来一些不便。
1、需要手动执行命令。
2、不能时时更新。
以下列出网上查找到的解决方法,m2eclipse plugin方式已验证通过。
通过验证eclipse版本:eclipse-jee-helios-SR2-win32
m2eclipse插件地址:http://m2eclipse.sonatype.org/sites/m2e
标准web工程通过m2eclipse添加依赖管理步骤:
1、“Maven ” –> “Enable dependency Management“
2、Web Deployment Assembly中添加maven dependencies
步骤如下图:
工程 -> 右键 -> preferences
.classpath文件中会有修改
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
为
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
以上操作可以在deploy时将jar包拷贝到lib目录下,而非在更新maven依赖时候拷贝jar包。
来源:http://blog.csdn.net/yirentianran/article/details/6429240
分享到:
相关推荐
web deployment project web deployment project web deployment project web deployment project web deployment project
思科PPT:Multicast Deployment and Standardization
Enterprise WLAN Deployment WLC & DNA
There is only a high-level goal to explore continuous delivery and deployment inside Kubernetes clusters. What I did do, though, was to set a few guidelines. The first guideline is that all the ...
WebDeployment for vs2010 vs2010/SN:YCFHQ-9DWCY-DKV88-T2TMH-G7BHP
k8s deployment service 实现例子.pdf 是我亲自写的,有什么不懂可以留言
VS2005发布网站时不会像VS2003一样生成规则的DLL文件、而生成的DLL文件名含有随机数且不能一个项目生成一个DLL文件、让人有一些遗憾、为了做到像vs2003一样,微软发布了WebDeployment Project插件可解决此问题。
The Mavent Ant Tasks allow several of ...Artifact deployment - deployment to a Maven repository (file integrated, other with extensions) POM processing - for reading and writing a Maven 2 pom.xml file
"Small Cell Networks: Deployment, PHY Techniques and Resource Management", Cambridge University Press, New York, USA,
Beginning-Django-Web-Application-Development-and-Deployment-with-Python.pdf
The Mavent Ant Tasks allow several of ...Artifact deployment - deployment to a Maven repository (file integrated, other with extensions) POM processing - for reading and writing a Maven 2 pom.xml file
When ASP was first released, Web programming was more difficult because you needed IIS to serve your ASP pages. Later, ASP.NET 2.0 and Visual Studio® 2005 made everything easier by introducing the ...
PowerBuilder Web Deployment Kit
刚出的一本关于femtocell的比较实用的书,比较系统的介绍了femtocell相关问题.
webDeployment.jar
Table of Contents Chapter 1: Introduction to the Django Framework Chapter 2: Django Urls and Views Chapter 3: Django Templates Chapter 4: Jinja Templates in Django Chapter 5: Django Application ...
Beginning Django Web Application Development and Deployment with Python 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Beginning Django Web Application Development and Deployment with Python 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除...
As well as MEAN you will also learn to build scripts with Grunt and Gulp, Webpack, and Vagrant as well as deployment for the web and mobile using Phonegap. Harness JavaScript to create dynamic and ...
System.Web.WebPages.Deployment