_resolver.removeDependency(dependencies, "org.mortbay.jetty", "servlet-api-2.5", null, "jar");
resolver.removeDependency(dependencies, "org.mortbay.jetty", "servlet-api-2.5", null, "jar");
    private Set resolveRuntimeJSP ()     throws Exception    {        try        {            Version jdkVersion = new Version(System.getProperty("java.version"));            Version jdk1_5Version = new Version("1.5");                        Set dependencies = Collections.EMPTY_SET;            if (jdkVersion.compare(jdk1_5Version) < 0)            {                getLog().info("Using JSP2.0 for non-jdk1.5 runtime");                                //get the dependencies                dependencies = _resolver.transitivelyResolvePomDependencies(_projectBuilder, "org.mortbay.jetty", "jsp-2.0", POM_VERSION, true);                                //check if there is already commons logging on the classpath, and if so, take out the jetty default slf4j commons                //logging bridge, and the slf4j impl                try                {                    Thread.currentThread().getContextClassLoader().loadClass("org.apache.commons.logging.Log");                       //there is already a CommonsLogging jar on the classpath, so we want to remove the default jetty one                    _resolver.removeDependency (dependencies, "org.slf4j", "jcl104-over-slf4j", null, "jar");                    _resolver.removeDependency (dependencies, "org.slf4j", "slf4j-simple", null, "jar");                }                catch (ClassNotFoundException e)                {                   getLog().debug("Using jetty default jcl104-over-slf4j bridge");                }                                try                {                    Thread.currentThread().getContextClassLoader().loadClass("org.slf4j.Logger");                    //already an slf4j log impl on the classpath, so take out the default jetty one                    _resolver.removeDependency (dependencies, "org.slf4j", "slf4j-simple", null, "jar");                }                catch (ClassNotFoundException e)                {                    getLog().debug("Using jetty default slf4j-simple log impl");                }               }            else            {                getLog().info("Using JSP2.1 for jdk1.5 runtime");                dependencies = _resolver.transitivelyResolvePomDependencies(_projectBuilder,                                                                            "org.mortbay.jetty", "jsp-2.1", POM_VERSION, true);            }                           //get rid of any copies of the servlet-api jar that might have been transitively introduced            //by the jsp project            _resolver.removeDependency(dependencies, "org.mortbay.jetty", "servlet-api-2.5", null, "jar");                        return dependencies;        }        catch (Exception e)        {            getLog().debug(e);            throw e;        }    }