David Yu | 3 Sep 2007 05:32
Favicon

Re: Is it possible to exclude commons-el as a dependency with the maven-jetty-plugin?

The best way to test is to do mvn -X -o jetty:run on your webapp to see the jars included on the classpath.
Dont do mvn -X on modules/maven-plugin.  Its only showing you the managed dependencies and not the actual dependencies present on
the classpath when you run the maven-jetty-plugin.

Hope that clears things up.

mraible wrote:
I have the latest version of Jetty SVN (I think). I cd into modules/maven-jetty and ran the following: mvn -X | tee mvn.log Then I looked at mvn.log and commons-el shows up right at the beginning: + Error stacktraces are turned on. Maven version: 2.0.6 [DEBUG] Building Maven user-level plugin registry from: '/Users/mraible/.m2/plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: '/opt/dev/tools/maven2/conf/plugin-registry.xml' [INFO] Scanning for projects... [DEBUG] Searching for parent-POM: org.mortbay.jetty:project::6.1-SNAPSHOT of project: org.mortbay.jetty:maven-jetty-plugin:maven-plugin:null in relative path: ../../pom.xml [DEBUG] Using parent-POM from the project hierarchy at: '../../pom.xml' for project: org.mortbay.jetty:maven-jetty-plugin:maven-plugin:null [DEBUG] Adding managed depedendencies for org.mortbay.jetty:maven-jetty-plugin [DEBUG] org.apache.maven:maven-plugin-tools-api:jar:2.0 [DEBUG] junit:junit:jar:3.8.2 [DEBUG] org.slf4j:jcl104-over-slf4j:jar:1.3.1 [DEBUG] org.slf4j:slf4j-simple:jar:1.3.1 [DEBUG] mx4j:mx4j:jar:3.0.1 [DEBUG] mx4j:mx4j-tools:jar:3.0.1 [DEBUG] xerces:xercesImpl:jar:${xerces-version} [DEBUG] commons-el:commons-el:jar:1.0 [DEBUG] ant:ant:jar:1.6.5 [DEBUG] javax.mail:mail:jar:1.4 [DEBUG] javax.activation:activation:jar:1.1 Unfortunately, even after removing commons-el from the root pom, the issue I'm having still seems to occur. :/ Index: pom.xml =================================================================== --- pom.xml (revision 2080) +++ pom.xml (working copy) <at> <at> -346,11 +346,6 <at> <at> <version>${xerces-version}</version> </dependency> <dependency> - <groupId>commons-el</groupId> - <artifactId>commons-el</artifactId> - <version>${commons-el-version}</version> - </dependency> - <dependency> <groupId>ant</groupId> <artifactId>ant</artifactId> <version>${ant-version}</version> <at> <at> -386,7 +381,6 <at> <at> <properties> <activation-version>1.1</activation-version> <ant-version>1.6.5</ant-version> - <commons-el-version>1.0</commons-el-version> <jasper-version>5.5.15</jasper-version> <jta-spec-version>1.0.1B-rc4</jta-spec-version> <junit-version>3.8.2</junit-version> Matt David Yu-2 wrote:
I did mvn -X on a 6.1-SNAPSHOT plugin and it sure didnt have commons-el on the classpath. After you checkout and build from head, run the plugin as mvn -X -o jetty:run , so that it will not fetch for the snapshot jars and use your "freshly-built" 6.1-SNAPSHOT jar on your repository. cheers mraible wrote:
I tried that and I still get the same error. Is it possible that anonymous svn is time delayed? If you do "mvn jetty:run -X | tee mvn.log" and look at mvn.log - you have no references to commons-el? I don't know if having commons-el in my classpath is the cause of the problem, but that's what the MyFaces mailing list seems to indicate. Matt janb wrote:
Matt, Hmmm, well that's definitely not right because the commons-el and ant jars no longer appear when I run mvn -X jetty:run. Everything is checked in at this end. Could you try again, but use <version>6.1-SNAPSHOT</version> as the version number of the jetty plugin? No idea if that really makes any difference, but it will definitely nail the version to the one you've built locally. cheers Jan mraible wrote:
I checked out from SVN, ran "mvn" from the root directory and then removed <version>6.1.5</version> from my project. I assume this is what I need to do in order to get the latest plugin that I installed locally. Unfortunately, no dice - the error still occurs. Caused by: javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'errors' at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:63) at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:88) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:67) Running mvn jetty:run-war -X > mvn.log and it seems that commons-el is still a dependency of the plugin: [DEBUG] Adding managed depedendencies for org.mortbay.jetty:maven-jetty-plugin[DEBUG] org.apache.maven:maven-plugin-tools-api:jar:2.0 [DEBUG] junit:junit:jar:3.8.2[DEBUG] org.slf4j:jcl104-over-slf4j:jar:1.3.1 [DEBUG] org.slf4j:slf4j-simple:jar:1.3.1 [DEBUG] mx4j:mx4j:jar:3.0.1[DEBUG] mx4j:mx4j-tools:jar:3.0.1 [DEBUG] xerces:xercesImpl:jar:${xerces-version}[DEBUG] commons-el:commons-el:jar:1.0 [DEBUG] ant:ant:jar:1.6.5 [DEBUG] javax.mail:mail:jar:1.4[DEBUG] javax.activation:activation:jar:1.1 [DEBUG] maven-jetty-plugin: using locally installed snapshot Matt janb wrote:
Matt, I've just discovered some cruft in the jetty maven plugin pom that included an unneeded dependency on commons-el! I've removed that and tested the plugin and it seems to be working ok. However, it would be ideal if you could do acheckout of jetty svn head and a build and see if it is working with your application now commons-el is out of the picture completely? thanks Jan mraible wrote:
I'm using JDK 5 on OS X. For Tomcat, I tested it on version 6.0.14. Matt janb wrote:
Matt, You must be using jdk1.4 because for jdk1.5 and up, jasper does not require commons-el. If in fact you are using jdk1.4 and therefore jsp-2.0, then you are actually using jasper 5.5.15 from apache. I don't know whether those versions of myfaces etc are supposed to work with jsp2.0, but if they are, then you might try and verify that you get the same error when running under tomcat 5.5.15. regards Jan mraible wrote:
Actually, I spoke too soon - removing commons-el causes a NoClassDefFoundError. However, the following seems to work fine on Tomcat 6.0.14 (with MyFaces 1.2.0, Tomahawk 1.1.6 and Facelets 1.13): <c:if test="${not empty errors}"> <div class="error" id="errorMessages"> <c:forEach var="error" items="${errors}"> <c:url value= " alt="<fmt:message key="icon.warning"/>" class="icon" /> <c:out value="${error}" escapeXml="false"/><br /> </c:forEach> </div> <c:remove var="errors" scope="session"/> </c:if> Using maven-jetty-plugin 6.1.5, I get: Caused by: javax.faces.el.EvaluationException: ELResolver cannot handle a null base Object with identifier 'errors' Any ideas? Thanks, Matt mraible wrote:
I'm trying to solve the following issue and it appears that the maven-jetty-plugin's dependency on commons-el is causing the problem. http://tinyurl.com/2vq9rf Is there any way to exclude it in my plugin's configuration? I'm using version 6.1.5. Thanks, Matt
-- Jan Bartel, Webtide LLC | janb <at> webtide.com | http://www.webtide.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Jetty-support mailing list Jetty-support <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jetty-support
-- Jan Bartel, Webtide LLC | janb <at> webtide.com | http://www.webtide.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Jetty-support mailing list Jetty-support <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jetty-support
-- Jan Bartel, Webtide LLC | janb <at> webtide.com | http://www.webtide.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Jetty-support mailing list Jetty-support <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jetty-support
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Jetty-support mailing list Jetty-support <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jetty-support

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Jetty-support mailing list
Jetty-support <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support

Gmane