【问题标题】:Maven filtering (token substitution) in Eclipse (STS) with Tomcat在 Eclipse (STS) 中使用 Tomcat 进行 Maven 过滤(令牌替换)
【发布时间】:2012-01-19 10:38:48
【问题描述】:

我基本上和这里有完全相同的问题:

http://stackoverflow.com/questions/2416155/issue-in-executing-spring-web-project-in-eclipse-on-tomcat-server

但该问题的修复不起作用。我的 pom.xml 中有属性,例如

<properties>
    <build.cmsBaseUrl>setineclipsebuildprofile</build.cmsBaseUrl>
</properties>

我可以从 Eclipse 构建配置文件中设置(或直接在 pom.xml 中设置,这不是问题的根源)。该属性会自动替换为我的 java 资源文件夹中的属性文件,例如

server.environment.cmsBaseUrl=${build.cmsBaseUrl}/

当使用 maven 构建并手动部署到 Tomcat 时。但是,如果我在 Eclipse (STS) 内部使用 Tomcat,则不会发生替换。我加了

war:inplace

按照其他答案的说明,但仍然没有替代:(

【问题讨论】:

    标签: eclipse spring maven-2 m2eclipse tomcat7


    【解决方案1】:

    我升级到 STS 2.8,有了新的 m2e 支持,过滤效果很好,开箱即用-

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-05
      • 2016-12-29
      • 2011-01-21
      • 2023-03-06
      • 2016-09-17
      • 2014-01-09
      • 2021-10-24
      相关资源
      最近更新 更多