Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty Maven Plugin best option for Unit testing?

The "stable-9" moniker confusingly refers to a stable URL location.
Jetty 9 is currently in milestones (hope to start release candidates soon)
Latest release was 9.0.0.M4.

You can find all of the eclipse projects under the org.eclipse.jetty groupId on the maven central repository.

So for your 2 dependencies, it would look like this now ...

      <dependency>
        <groupId>org.eclipse.jetty.orbit</groupId>
        <artifactId>javax.servlet</artifactId>
        <version>3.0.0.v201112011016</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-http</artifactId>
        <version>9.0.0.M4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlet</artifactId>
        <version>9.0.0.M4</version>
        <scope>test</scope>
      </dependency>

And the 2 classes have the new signatures:

org.mortbay.jetty.testing.HttpTester   ->  org.eclipse.jetty.http.HttpTester
org.mortbay.jetty.testing.ServletTester  -> org.eclipse.jetty.servlet.ServletTester

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts


On Thu, Jan 17, 2013 at 4:03 PM, Lewis John Mcgibbney <lewis.mcgibbney@xxxxxxxxx> wrote:
Hi,
I'm in the middle of addressing an issue which requires us to set up a local Jetty server for testing purposes. We also need to serve static content from the server.
During this process we may as well upgrade our existing Jetty dependencies from the following
      <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>servlet-api-3.0</artifactId>
        <version>7.0.0pre2</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-servlet-tester</artifactId>
        <version>7.0.0.pre5</version>
        <scope>test</scope>
      </dependency>
To the new Eclipse artifacts (stable9)
We currently use org.mortbay.jetty.testing.HttpTester and org.mortbay.jetty.testing.ServletTester for some JUnit servlet testing.

Therefore my questions are as follows
1) Are the stable 9 artifacts available as maven artifacts in a repository somewhere? If not, then which version is the most recent that is available for me to use as a Maven dependency?
2) Is is it possible to reuse the above artifacts to serve static content which I can then use to test my HTTP Client code within my unit tests? If so how?

Thank you very much for any feedback, it would be a great help to me.

Lewis

--
Lewis

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top