war Ant task with needxmlfile="false" still complains

Posted by Menelaos Perdikeas on Stack Overflow See other posts from Stack Overflow or by Menelaos Perdikeas
Published on 2012-05-31T20:16:39Z Indexed on 2012/06/02 16:40 UTC
Read the original article Hit count: 622

Filed under:
|

I have the following war task in my build.xml and even though needxmlfile is set to false, Ant (version 1.8.2) complains when the web.xml file does not exist ("BUILD FAILED ... Deployment descriptor: /home/.../web/WEB-INF/web.xml does not exist")

What am I missing?

  <target name="war" depends="build">                                                                           
    <mkdir dir="${build.dir}"/>                                                                                 
    <war                                                                                                        
      needxmlfile="false"                                                                                       
      basedir="${webroot.dir}"                                                                                  
      warfile="${build.dir}/${project.distname}.war"                                                            
      webxml="${webinf.dir}/web.xml">                                                                           
      <exclude name="WEB-INF/${build.dir}/**"/>                                                                 
      <exclude name="WEB-INF/src/**"/>                                                                          
      <exclude name="WEB-INF/web.xml"/>                                                                         
     </war>                                                                                                     
  </target>  

© Stack Overflow or respective owner

Related posts about ant

Related posts about web.xml