Hi folks, "mvn clean install" and "ant war" will now create nearly
identical WARs (differing only in the WEB-INF/lib folder) -- but ATM
only the latter still works. I think it's something related to the
precompiled JSPs (which the Maven WAR doesn't rely on presently, but I'm
not sure where they are in the Ant WAR, so???) When running the
Mavenized version, the JSPWiki log files are reporting:
2013-04-02 17:29:51,149 [http-bio-8080-exec-6] WARN
org.apache.wiki.tags.WikiTagBase JSPWiki:/JSPWiki/
JSPWiki:http://localhost:8080/JSPWiki/ - Including failed, got a servlet
exception from sub-page. Rethrowing the exception to the JSP engine.
org.apache.jasper.JasperException: <h3>Validation error messages from
TagLibraryValidator for fmt in
/templates/default/UserBox.jsp</h3><p>null:
org.xml.sax.SAXParseException; lineNumber: 206; columnNumber: 15;
parsing error: org.gjt.xpp.XmlPullParserException: end tag name should
be wiki:Translate not fmt:message at line 206 and column 15 seen
"...</jsp:text>\n</fmt:message"... (parser state END_TAG)</p>
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:410)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
and
at java.lang.Thread.run(Thread.java:722)
2013-04-02 17:29:51,833 [http-bio-8080-exec-6] WARN
org.apache.wiki.tags.WikiTagBase JSPWiki:/JSPWiki/
JSPWiki:http://localhost:8080/JSPWiki/ - Including failed, got a servlet
exception from sub-page. Rethrowing the exception to the JSP engine.
org.apache.jasper.JasperException: java.lang.ClassNotFoundException:
org.apache.jsp.templates.default_.UserBox_jsp
at
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
The Mavenized version of http://localhost:8080/JSPWiki will still
activate but the front page text is not visible (only the headers and
footers show). I'll look into this next but if anyone can see what's
immediately wrong with the Maven WAR (and optionally wants to fix it),
please go ahead.
Another issue the WEB-INF/libs/*.JARs are mostly but not completely
identical between the Ant and Maven WARs because with Maven dependency
resolution, additional JARs needed by those declared dependencies are
brought in (unless we explicitly exclude them) while our Ant scripts
will not use JARs that we don't manually configure. In particular the
Jaxen dependency ends up bringing in 11 additional dependencies that the
Ant build skips (upping the JAR count from 31 jars to 43), here are some
but not all of them (you can see them by running mvn dependency:tree):
[INFO] +- jaxen:jaxen:jar:1.1-beta-6:compile
[INFO] | +- dom4j:dom4j:jar:1.5.2:compile
[INFO] | | \- jaxme:jaxme-api:jar:0.3:compile
[INFO] | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | +- xerces:xercesImpl:jar:2.4.0:compile
[INFO] | \- xom:xom:jar:1.0b3:compile
[INFO] | +- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] | +- xalan:xalan:jar:2.6.0:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | \- org.ccil.cowan.tagsoup:tagsoup:jar:0.9.7:compile
Do we need Jaxen today in JSPWiki anyway? I just see RPCHandlerTest
failing if I don't include it. As I understand, Jaxen was best in the
pre-JDK 5.0 days when there was no default XPath parser in the JDK. If
we can rely on what the JDK supplies by default for XPath processing we
can remove a lot of extra JARs from the Maven-built WAR.
Besides these, there are 4 more JARs that Maven is determining
necessary: jakarta-regexp-1.4.jar used by lucene-queries,
lucene-queries used by lucene-highlighter, xpp3 used by sandler, and
xerces used by nekohtml.
Finally, IIRC we had earlier determined that Stripes was not needed in
the WAR (it's just used during running the test cases), so I removed it
from the "war" task in the Ant build.xml. If I'm incorrect on this, we
can put it back in.
Regards,
Glen