Eclipse中的Maven Profiles和Tomcat [英] Maven Profiles and Tomcat in Eclipse

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

问题描述

如果我有两个这样的WAR应用程序的maven配置文件:

If I have 2 maven profiles for a WAR application like this:

mvn clean install -Pdevelopment
mvn clean install -Pproduction

我将其导入到Eclipse中运行在Tomcat中,我如何告诉Tomcat使用一个配置文件或其他配置文件?

and I import it in Eclipse to run in Tomcat, how to I tell Tomcat to use one profile or the other?

推荐答案

您可以激活 maven配置文件 Eclipse 通过使用以下步骤: -

You can activate the maven profile at the Eclipse by using the following step: -


  1. 在项目中右键单击,然后选择属性

  2. 属性窗口选择 Maven

  3. 右侧面板您将看到 Active Maven Profiles 文本框。

  4. 请输入您的个人资料名称,例如开发生产

  1. Right click at your project and select properties .
  2. At the Properties windows select Maven.
  3. At the right hand panel you will see Active Maven Profiles text box.
  4. Please enter your profile name, e.g. development or production.

我希望这可能有所帮助。

I hope this may help.

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

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