@Test
  public void testNewWebAntProject() throws Exception {
    final String projectName = "test-web-project-sdk";
    final NewLiferayPluginProjectOp op = newProjectOp(projectName);

    op.setPluginType(PluginType.web);

    final IProject webProject = createAntProject(op);

    final IVirtualFolder webappRoot = CoreUtil.getDocroot(webProject);

    assertNotNull(webappRoot);
  }
  private IModuleResource getWebXmlFile(IProject project, IPath modelDeployDirectory) {
    // IDE-110 IDE-648
    IVirtualFolder webappRoot = CoreUtil.getDocroot(project);

    if (webappRoot != null) {
      for (IContainer container : webappRoot.getUnderlyingFolders()) {
        if (container != null && container.exists()) {
          IFile webXml = container.getFile(new Path(WEB_XML_PATH));

          if (webXml.exists()) {
            return new ModuleFile(
                webXml, webXml.getName(), modelDeployDirectory.append(WEB_XML_PATH));
          }
        }
      }
    }

    return null;
  }
  private boolean checkDocrootFileExists(final IPath path) {
    IVirtualFolder webappRoot = CoreUtil.getDocroot(getTargetProject());

    if (webappRoot == null) {
      return false;
    }

    for (IContainer container : webappRoot.getUnderlyingFolders()) {
      if (container != null && container.exists()) {
        IFile file = container.getFile(path);

        if (file.exists()) {
          return true;
        }
      }
    }

    return false;
  }