Testing Jetty 7 and Jetty 8 (and Glassfish)

193 views
Skip to first unread message

David Pollak

unread,
Jan 14, 2011, 12:41:44 AM1/14/11
to liftweb
Howdy,

I'm looking to use Maven to run a Lift app in Jetty 7, Jetty 8 and Glassfish.  Can anyone point me to pom.xml changes and/or command line options to allow me to select something other than Jetty 6.1.25?

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Christopher Taylor

unread,
Jan 14, 2011, 1:51:40 AM1/14/11
to lif...@googlegroups.com
On 14.01.2011, at 06:41, David Pollak wrote:

> I'm looking to use Maven to run a Lift app in Jetty 7, Jetty 8 and Glassfish. Can anyone point me to pom.xml changes and/or command line options to allow me to select something other than Jetty 6.1.25?


For Jetty7 there's this: http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin
Note that the plugin was renamed to jetty-maven-plugin (used to be maven-jetty-plugin)

For Glassfish, a quick Google search turned up http://maven-glassfish-plugin.java.net/usage.html

If you want to switch between different setups, I believe maven offers the concept of profiles, but I haven't worked with them myself.

Regards,
--Chris

Indrajit Raychaudhuri

unread,
Jan 14, 2011, 2:16:37 AM1/14/11
to lif...@googlegroups.com
Right! So you can have something like the following and activate the respective profiles via -Pjetty7, -Pjetty8, -Pgfish etc.

<profiles>
  <profile>
    <id>jetty6</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>maven-jetty-plugin</artifactId>
          <version>6.1.25</version>
          <!-- <configuration>
          </configuration> -->
        </plugin>
      </plugins>
    </build>
  </profile>
  <profile>
    <id>jetty7</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>7.2.2.v20101205</version>
          <!-- <configuration>
          </configuration> -->
        </plugin>
      </plugins>
    </build>
  </profile>
  <profile>
    <id>jetty8</id>
    <build>
      <plugins>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>8.0.0.M2</version>
          <!-- <configuration>
          </configuration> -->
        </plugin>
      </plugins>
    </build>
  </profile>
  <profile>
    <id>gfish</id>
    <pluginRepositories>
      <pluginRepository>
        <id>java-net.releases</id>
        <name>Java.net Plugins Repository</name>
        <url>http://download.java.net/maven/2</url>
      </pluginRepository>
    </pluginRepositories>    
    <build>
      <plugins>
        <plugin>
          <groupId>org.glassfish.maven.plugin</groupId>
          <artifactId>maven-glassfish-plugin</artifactId>
          <version>2.1</version>
          <!-- <configuration>
          </configuration> -->
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

- Indrajit
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Philippe

unread,
Jan 14, 2011, 1:57:16 AM1/14/11
to lif...@googlegroups.com

You have to change in the pom.xml


        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.25</version>

by


        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>?</version>

You can find all version available here : http://mvnrepository.com/artifact/org.mortbay.jetty/jetty-maven-plugin
Don't forget to change jetty dependency also.

This plugin was renamed to jetty-maven-plugin to better conform to maven2 convention.
You can have to do some modification for the configuration (see the official website for that).

Philippe

David Pollak

unread,
Jan 14, 2011, 9:08:12 AM1/14/11
to lif...@googlegroups.com
Perfect.

Thanks!
Reply all
Reply to author
Forward
0 new messages