【问题标题】:Eclipse org.eclipse.wst.common.component file re-written during 'mvn clean'Eclipse org.eclipse.wst.common.component 文件在“mvn clean”期间重写
【发布时间】:2011-03-21 17:01:52
【问题描述】:

我已经手动配置了我的 org.eclipse.wst.common.component 以通过 Eclipse WTP 从我的项目的目标目录部署我的 web 应用程序(所以我的部署包括 JSP 预编译的结果)。

但是现在每次我运行“mvn clean”构建(命令行或在 M2Eclipse 中,文件都会恢复到以前的状态。有人知道为什么会发生这种情况吗?

谢谢

【问题讨论】:

    标签: eclipse maven-2 eclipse-wtp


    【解决方案1】:

    好的,知道了。我的 settings/org.eclipse.wst.common.component 看起来像这样:

    <?xml version="1.0" encoding="UTF-8"?>
    <!--THIS IS WRONG-->
    <project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="dss-sample-webapp">
        <property name="context-root" value="dss-sample-webapp"/>
        <wb-resource deploy-path="/" source-path="/target/dss-sample-webapp" />
    </wb-module>
    

    每次我删除 target/dss-sample-webapp 目录(就像使用 'mvn clean' 构建)时,文件中的相应行都会自动消失:

    <wb-resource deploy-path="/" source-path="/target/dss-sample-webapp" />
    

    删除前导“/”解决了这个问题。我可以随意删除目标目录,settings/org.eclipse.wst.common.component 文件不受影响。

    所以,功能齐全的 settings/org.eclipse.wst.common.component 如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <!--THIS IS RIGHT-->
    <project-modules id="moduleCoreId" project-version="1.5.0">
    <wb-module deploy-name="dss-sample-webapp">
        <property name="context-root" value="dss-sample-webapp"/>
        <wb-resource deploy-path="/" source-path="target/dss-sample-webapp" />
    </wb-module>
    

    【讨论】:

      猜你喜欢
      • 2016-07-27
      • 2013-11-16
      • 1970-01-01
      • 1970-01-01
      • 2012-02-09
      • 2015-11-16
      • 1970-01-01
      • 2013-05-12
      • 1970-01-01
      相关资源
      最近更新 更多