在Eclipse中将Tomcat用于Maven项目 [英] Using Tomcat within Eclipse for a Maven project

查看:63
本文介绍了在Eclipse中将Tomcat用于Maven项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多模块Maven项目.它的结构如下:

I have a multi-module Maven project. Here is how it is structured:

  1. cca-workflow(父项目)
  2. cca-commons(罐子)
  3. cca-models(罐子)
  4. cca-wsclient(jar)
  5. cca-business(罐子)
  6. cca-web(战争)

战争项目取决于jar项目.在我的父项目中,我有一个Maven属性文件,该文件在构建时会替换一些Spring属性,例如web_service_url,端口,wsdl等.项目已正确解析,所有属性均已解决.

The war project depends on the jar projects. In my parent project, I have a Maven properties file which at build time replaces some of my Spring properties e.g. web_service_url, port, wsdl etc. The project builds correctly with all the properties getting resolved.

问题是当我尝试使用maven-eclipse-plugin在Eclipse中使用Tomcat时.这会将项目配置为可以在tomcat中进行部署,但是并没有将Maven属性解析到我的Spring属性文件中,这会导致部署失败.

The problem is when I try using Tomcat from within Eclipse using the maven-eclipse-plugin. This configures the project to be able to be deployed in tomcat, however it is not resolving the Maven properties into my Spring properties file which causes the deployment to fail.

推荐答案

您需要使用m2eclipse,然后才能在Tomcat中使用WTP.

You need to use m2eclipse, then you can use WTP with Tomcat.

这篇关于在Eclipse中将Tomcat用于Maven项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆