Wednesday, February 5, 2014

jetty 9 in maven. Newer jetty, older jetty

Update from jetty 6 to jetty 9 done - solved!

Fixed version Jetty 9:
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.1.1.v20140108</version>
        </plugin>

Latest Jetty:
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
        </plugin>

Older jetty 6 was with non-eclipse groupId, which cause auto version update to 7+ not to works. If you want Jetty 6, this is the pom.xml fraction you need.
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>maven-jetty-plugin</artifactId>
        </plugin>

Custom configuration
Some useful configuration options for Jetty:
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <configuration>
              <scanIntervalSeconds>2</scanIntervalSeconds>
              <webApp>
                <contextPath>/my-context</contextPath><!-- default is / -->
              </webApp>
            </configuration>    
       
        </plugin>

No comments:

Post a Comment