Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 6.0.0beta12, 6.0.0beta14, 6.0.0beta15
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
I've not yet investigated what changed, but it works when I use beta11. An example is MRM:
http://svn.apache.org/repos/asf/maven/repository-manager/trunk (run mvn install at the root, then jetty6:run in the webapp)
Caused by: java.lang.ClassCastException: org.apache.maven.plugin.MavenPluginDiscoverer
at org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager.initialize(DefaultComponentDiscovererManager.java:89)
at org.codehaus.plexus.DefaultPlexusContainer.initializeCoreComponents(DefaultPlexusContainer.java:1252)
at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:640)
at org.codehaus.plexus.embed.Embedder.start(Embedder.java:216)
at org.codehaus.plexus.servlet.ServletContextUtils.createContainer(ServletContextUtils.java:172)
at org.codehaus.plexus.servlet.PlexusServletContextListener.contextInitialized(PlexusServletContextListener.java:65)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:368)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:970)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:341)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:368)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:37)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:133)
at org.mortbay.jetty.Server.doStart(Server.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:37)
at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:116)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:398)
... 21 more
patch to workaround the problem.
the fix is to set the priority back to java2 instead of child-first. This also requires that all the jetty classes be in the same classloader, so I've removed the manual jsp creation and switched that for a profile (it has the same effect on the jsp side - might need to check the logging jars used).
there might be a more complete solution to this instead of using the java2 style, but I believe when only run inside Maven this is not a bad thing anyway.