Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346405 - jetty-maven-plugin cannot start when <defaultsDescriptor> is specified
Summary: jetty-maven-plugin cannot start when <defaultsDescriptor> is specified
Status: RESOLVED INVALID
Alias: None
Product: Jetty
Classification: RT
Component: other (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Jan Bartel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 05:32 EDT by Gilbert CLA
Modified: 2011-06-29 22:37 EDT (History)
2 users (show)

See Also:


Attachments
Exception thrown during startup using maven (11.53 KB, text/plain)
2011-05-19 05:41 EDT, Gilbert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gilbert CLA 2011-05-19 05:32:27 EDT
Build Identifier: 20110301-1815

I'm trying to following the solution provided here: http://stackoverflow.com/questions/4988019/jetty-maven-plugin-is-ignoring-custom-webdefault-xml
to get around the static file locking issues on Windows.

Here's the output when the jetty server started 
[INFO] Web defaults = src/main/resources/webdefault.xml
[INFO] Web overrides =  none


but after a while, a java exception thrown
 java.lang.ClassNotFoundException: org.mortbay.jetty.servlet.DefaultServlet

Reproducible: Always

Steps to Reproduce:
1. copy webdefault.xml from jetty.jar

2. set "useFileMappedBuffer" to "false" like the followings:
<init-param>
      <param-name>useFileMappedBuffer</param-name>
      <param-value>false</param-value>
</init-param> 

3. add the followings under <plugins> in pom.xml
       <plugin>
    		<groupId>org.mortbay.jetty</groupId>
    		<artifactId>jetty-maven-plugin</artifactId>
    		<version>8.0.0.M2</version>
    		<configuration>
    			<webAppConfig>
    				<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
    				<contextPath>/mycontext</contextPath>
    			</webAppConfig>
    			<scanIntervalSeconds>5</scanIntervalSeconds>
    		</configuration>
    	</plugin>

4.  $ mvn  clean jetty:run
Comment 1 Gilbert CLA 2011-05-19 05:41:36 EDT
Created attachment 196089 [details]
Exception thrown during startup using maven

FYI, i'm using Stripes framework 1.5.6 with this
Comment 2 Jan Bartel CLA 2011-06-29 22:37:46 EDT
Gilbert,

I think you've copied the webdefaults.xml from the older jetty version, as the DefaultServlet in jetty-7.x onwards is at the org.eclipse package namespace. Try extracting and modifying webdefaults.xml from a jetty-7 or jetty-8 jar.

I'll close this issue for now, as I'm 99.999999% sure that's the problem. If not, please do reopen.

Jan