I have a project where I have written some tests for jsps and these jsp's refer to jstl tags and using embedded jetty. The tests are running fine in eclipse workspace when I run them from "Run as JUnit" menu.
However running as 'mvn clean install' the JSTL taglib is not found and tests fail with an exception mentioned below. On analyzing, it is found that maven surefire plugin runs the tests from an executable jar and classpath is mentioned in the manifest.mf file of executable jar. The Jasper TLD scanner is not looking inside executable jar's manifest for classpath jars and not loading any tld's from dependent jars, resulting in this error. Please let me know of any workaround to this
org.apache.jasper.JasperException: /WEB-INF/tags/PageInfo.tag(2,61) PWC6188: The absolute uri:
http://java.sun.com/jstl/core_rt cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:89)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:375)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:169)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:427)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:236)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:499)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:579)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1649)
at org.apache.jasper.compiler.Parser.parse(Parser.java:182)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:140)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:207)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:446)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:623)
at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:278)
at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:658)
at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:89)
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:717)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1500)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2295)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2345)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2351)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:497)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2295)
at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:735)
org\apache\geronimo\specs\geronimo-jsp_2.2_spec\1.0\geronimo-jsp_2.2_spec-1.0.jar
org\glassfish\web\jsp-impl\2.2.1-b03\jsp-impl-2.2.1-b03.jar
org\apache\geronimo\ext\tomcat\jasper-el\7.0.0.1\jasper-el-7.0.0.1.jar
org\apache\geronimo\specs\geronimo-el_2.2_spec\1.0\geronimo-el_2.2_spec-1.0.jar
org\eclipse\jetty\jetty-webapp\8.0.0.RC0\jetty-webapp-8.0.0.RC0.jar
org\eclipse\jetty\jetty-xml\8.0.0.RC0\jetty-xml-8.0.0.RC0.jar
org\eclipse\jetty\jetty-util\8.0.0.RC0\jetty-util-8.0.0.RC0.jar
org\eclipse\jetty\jetty-servlet\8.0.0.RC0\jetty-servlet-8.0.0.RC0.jar
org\eclipse\jetty\jetty-security\8.0.0.RC0\jetty-security-8.0.0.RC0.jar
org\eclipse\jetty\jetty-server\8.0.0.RC0\jetty-server-8.0.0.RC0.jar
org\eclipse\jetty\jetty-continuation\8.0.0.RC0\jetty-continuation-8.0.0.RC0.jar
org\eclipse\jetty\jetty-http\8.0.0.RC0\jetty-http-8.0.0.RC0.jar
org\eclipse\jetty\jetty-io\8.0.0.RC0\jetty-io-8.0.0.RC0.jar
org\apache\geronimo\specs\geronimo-servlet_3.0_spec\1.0\geronimo-servlet_3.0_spec-1.0.jar
org\apache\geronimo\bundles\jstl\1.2_1\jstl-1.2_1.jar
junit\junit\4.8.1\junit-4.8.1.jar
org\openqa\selenium\2.0.4\selenium-2.0.4.jar