Search
Calendar
June 2017
S M T W T F S
« Sep    
 123
45678910
11121314151617
18192021222324
252627282930  
Your widget title
Archives

PostHeaderIcon Maven / Jetty / Cannot override read-only parameter: contextPath in goal

Case

My project is deployed via Maven on a Jetty 6 server. I have to upgrade the server to Jetty 7.
(BTW: notice that the plugin maven-jetty-plugin was renamed as jetty-maven-plugin)

I get this error:

 Error configuring: org.mortbay.jetty:jetty-maven-plugin. Reason: ERROR: Cannot override read-only parameter: contextPath in goal: jetty:run-exploded

Quick fix

Insert a tag <webAppConfig> between <configuration> and <contextPath>. In other terms, replace this block:

<configuration>
    <contextPath>/I/love/USA</contextPath>
</configuration>

with that one:

<configuration>
    <webAppConfig>
        <contextPath>/I/love/USA</contextPath>
    </webAppConfig>
</configuration>

Leave a Reply