on save 使用 Maven Eclipse 和 WebLogic 进行编译和部署

发布于 2024-09-30 00:54:11 字数 617 浏览 0 评论 0原文

我刚刚开始了maven,具体来说是m2eclipse。 我之前一直在做的事情如下:

1)将我的应用程序部署到tomcat。 2) 对 java 或 jsp 文件进行任何更改。 3)保存并再次运行应用程序(除非我更改了配置文件,否则不需要重新启动)。

现在,每次我在 eclipse 中对 Maven 项目进行微小更改时,我都必须执行“预全新安装”来再次编译和部署应用程序,然后重新启动 weblogic 10 以查看更改。

无论如何(或者也许我没有做正确的事情),当我修改类或jsp文件时,当我保存文件时,代码将被编译和部署,就像我之前使用eclipse默认项目生成器和tomcat所做的那样?

另外,当我从 SVN 签出 Maven 项目时,Eclipes 由于缺少一些类而显示了一堆编译错误,但是当我使用 m2eclipse 构建项目时,一切都构建成功。为什么 Eclipse 无法识别这些类?

我查看了以下答案,但无法找出问题所在。

如何在 Eclipse 中保存时启动 Maven“编译”目标?

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.

How do I start Maven "compile" goal on save in Eclipse?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

方圜几里 2024-10-07 00:54:11

现在,每次我在 Eclipse 中对 Maven 项目进行微小更改时,我都必须执行“预全新安装”来再次编译和部署应用程序,然后重新启动 weblogic 10 以查看更改。

你不应该这样做。您是否使用 Oracle Enterprise Pack for Eclipse (OEPE )(可从市场更新站点)和支付意愿?

无论如何(或者也许我没有做正确的事情),当我修改类或jsp文件时,当我保存文件时,代码将被编译和部署,就像我之前使用eclipse默认项目构建器所做的那样还有雄猫?

见上文。

另外,当我从 SVN 签出 Maven 项目时,Eclipes 由于缺少一些类而显示一堆编译错误,但是当我使用 m2eclipse 构建项目时,一切都构建成功。为什么 Eclipse 无法识别这些类?

尝试以下操作:右键单击项目,然后Maven >更新项目配置

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.

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?

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?

See above.

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 successful. Why is eclipse not recognizing the classes??

Try the following: right-click on the project then Maven > Update Project Configuration.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文