Home:ALL Converter>Eclipse Jetty to Mortbay Jetty

Eclipse Jetty to Mortbay Jetty

Ask Time:2014-08-26T03:36:38         Author:Thys Andries Michels

Json Formatter

I have eclipse jetty configured

  <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.1.0.v20131115</version>
            <configuration>
              <scanIntervalSeconds>1</scanIntervalSeconds>
              <webApp>
                <contextPath>/websockets</contextPath>
              </webApp>
            </configuration>
          </plugin>

Now I want to deploy it to Heroku. I change plugin to Mortbay Jetty

 <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.3</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals><goal>copy</goal></goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>org.mortbay.jetty</groupId>
                                <artifactId>jetty-runner</artifactId>
                                <version>7.5.4.v20111024</version>
                                <destFileName>jetty-runner.jar</destFileName>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>

The apps starts but the contextPath is not set to /websockets. How can i configure Mortbay Jetty's contextPath?

Author:Thys Andries Michels,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25493129/eclipse-jetty-to-mortbay-jetty
yy