if  (getJettyEnvXml() != null) { setJettyEnvXmlFile(new File(getJettyEnvXml()));  try { if (!getJettyEnvXmlFile().exists()) throw new MojoExecutionException("jetty-env.xml file does not exist at location "+jettyEnvXml); else getLog().info(" jetty-env.xml file located at: "+getJettyEnvXmlFile().getCanonicalPath()); } catch (IOException e) { throw new MojoExecutionException("jetty-env.xml does not exist"); } }
    public void checkPomConfiguration () throws MojoExecutionException    {        // check the location of the static content/jsps etc        try        {            if ((getWebAppSourceDirectory() == null) || !getWebAppSourceDirectory().exists())                throw new MojoExecutionException("Webapp source directory "                        + (getWebAppSourceDirectory() == null ? "null" : getWebAppSourceDirectory().getCanonicalPath())                        + " does not exist");            else                getLog().info( "Webapp source directory is: "                        + getWebAppSourceDirectory().getCanonicalPath());        }        catch (IOException e)        {            throw new MojoExecutionException("Webapp source directory does not exist", e);        }                       // get the web.xml file if one has been provided, otherwise assume it is        // in the webapp src directory        if (getWebXml() == null || (getWebXml().trim().equals("")))            setWebXmlFile(new File(new File(getWebAppSourceDirectory(),"WEB-INF"), "web.xml"));        else            setWebXmlFile(new File(getWebXml()));                try        {            if (!getWebXmlFile().exists())                throw new MojoExecutionException( "web.xml does not exist at location "                        + webXmlFile.getCanonicalPath());            else                getLog().info( "web.xml file located at: "                        + webXmlFile.getCanonicalPath());        }        catch (IOException e)        {            throw new MojoExecutionException("web.xml does not exist", e);        }                // check the classes to form a classpath with        try        {            //allow a webapp with no classes in it (just jsps/html)            if (getClassesDirectory() != null)            {                if (!getClassesDirectory().exists())                    getLog().info( "Classes directory "+ getClassesDirectory().getCanonicalPath()+ " does not exist");                else                    getLog().info("Classes located at: " + getClassesDirectory().getCanonicalPath());            }            else                getLog().info("Classes directory not set");                 }        catch (IOException e)        {            throw new MojoExecutionException("Location of classesDirectory does not exist");        }                // check the tmp directory        if (getTmpDirectory() != null)        {            if (!getTmpDirectory().exists())            {                if (!getTmpDirectory().mkdirs())                    throw new MojoExecutionException("Unable to create tmp directory at " + getTmpDirectory());            }            getLog().info("tmp dir for webapp will be "+ getTmpDirectory().toString());        }        else            getLog().info("tmp dir will be Jetty default");                  }