• Post Reply Bookmark Topic Watch Topic
  • New Topic

Maven Tomcat plugin precompile JSPs problem  RSS feed

Janne Laitinen
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've been trying to precompile my JSP pages using Maven and have almost succeded in it.

The problem I'm having has to do with the classpath in use when doing the compiling. The JspC compiler classpath contains only the libraries that are under my webapp directory (the one that is created using 'maven war:webapp').

The JPS pages that I'm trying to precompile need a reference to these libraries: jasper-compiler.jar, jasper-runtime.jar, jspapi.jar and servlet-api.jar. But these are also libraries that I don't want to include to the webapp directory.

So how can I tell Maven (or Jasper JspC) to include some additional libraries to its classpath?

Example of my project structure:

-- ...
-- lib
-- src
-- target
-- myapp
-- lib (Only this is included in the classpath, why?)
-- tomcat
-- src (the JSP source codes are generated here)

The lib-directory in the root of my project contains the additional libraries mentioned earlier. I have introduced them in the project.xml, but they are not included in to the war structure (intentionally).

My question/problem again: does anyone know how can I make these libraries also available for the JSP compilation?

I'm using the 'maven tomcat:jspc' goal.

And, if I add the additional libraries to the webapp lib directory, the JSPs will be compiled just fine.


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!