【问题标题】:war does not support nested "fileset" element战争不支持嵌套的“文件集”元素
【发布时间】:2016-12-16 09:38:55
【问题描述】:

我正在尝试从 Eclipse 运行 build.xml 文件,以自动执行创建战争并将其部署到服务器的 webapps 文件夹的过程。我为此编写了一个脚本,但在运行它时出现“战争不支持嵌套的“文件集”元素”的错误。

我在谷歌上搜索了很多,但无法找到解决方案。请帮助任何人。我正在使用 Ant 1.9.7 版。提前致谢。

<target name="warTarget">
   <war warfile="myjar.war" needxmlfile="false">
     <filset dir="WebContent"></filset>
    </war>
    <antcall target="deployTarget"></antcall>
</target>

【问题讨论】:

    标签: java eclipse tomcat ant build.xml


    【解决方案1】:

    fileset 拼写错误

    <filset dir="WebContent"></filset>
    

    应该是

    <fileset dir="WebContent"/>
    

    更多关于如何使用 WAR 任务 Please see 来创建战争

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-10-21
      • 1970-01-01
      • 2015-10-27
      • 2023-01-14
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多