on save 使用 Maven Eclipse 和 WebLogic 进行编译和部署
我刚刚开始了maven,具体来说是m2eclipse。 我之前一直在做的事情如下:
1)将我的应用程序部署到tomcat。 2) 对 java 或 jsp 文件进行任何更改。 3)保存并再次运行应用程序(除非我更改了配置文件,否则不需要重新启动)。
现在,每次我在 eclipse 中对 Maven 项目进行微小更改时,我都必须执行“预全新安装”来再次编译和部署应用程序,然后重新启动 weblogic 10 以查看更改。
无论如何(或者也许我没有做正确的事情),当我修改类或jsp文件时,当我保存文件时,代码将被编译和部署,就像我之前使用eclipse默认项目生成器和tomcat所做的那样?
另外,当我从 SVN 签出 Maven 项目时,Eclipes 由于缺少一些类而显示了一堆编译错误,但是当我使用 m2eclipse 构建项目时,一切都构建成功。为什么 Eclipse 无法识别这些类?
我查看了以下答案,但无法找出问题所在。
I just started maven in general and m2eclipse in specific.
What I have been doing before is follow:
1)Deploy my application to tomcat.
2) make any changes to the java or jsp files.
3) save and run the application again ( no restart is neccessary unless I changed a config file).
now, everytime I make a minor change to my maven project in eclipse I have to do a "pre-clean install" to compile and deploy the application again and then restart weblogic 10 to view the changes.
Is there anyway ( or maybe I m not doing something right) that I when I modify a class or jsp file, the code will get compiled and deployed when I save the file like I was doing before with the eclipse default project builder and tomcat?
Also, When I checkout the maven project from SVN, Eclipes shows bunch of compiling errors due to some missing classes, but when I build the project using m2eclipse everything builds successfull. Why is eclipse not recognizing the classes??
I have looked at the following answer but I was not able to figure out the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不应该这样做。您是否使用 Oracle Enterprise Pack for Eclipse (OEPE )(可从市场或更新站点)和支付意愿?
见上文。
尝试以下操作:右键单击项目,然后Maven >更新项目配置。
You shouldn't have to do that. Are you using the Oracle Enterprise Pack for Eclipse (OEPE) (available from the market place or from an update site) and the WTP?
See above.
Try the following: right-click on the project then Maven > Update Project Configuration.