Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:06:38+00:00 2026-06-12T12:06:38+00:00

I have a WAR Module in a multi-module Maven project (let’s say foo-web), which

  • 0

I have a WAR Module in a multi-module Maven project (let’s say foo-web), which realises a web-service. Then I have a foo-cli, which implements a web service client and tests it in a couple of unit tests.

In order to make this working, I start Jetty before the test phase this way:

<dependency>
  <groupId>${project.groupId}</groupId>
  <artifactId>foo-web</artifactId>
  <version>${project.version}</version>
  <type>war</type>
  <scope>test</scope>
</dependency>         
...
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
   <configuration>

     <scanIntervalSeconds>10</scanIntervalSeconds>
     <useTestScope>true</useTestScope>
     <connectors>
       <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
         <port>8080</port>
         <maxIdleTime>60000</maxIdleTime>
       </connector>
     </connectors>
   </configuration>

<executions>
    <execution>
      <id>start-jetty</id>
      <phase>process-test-classes</phase>
      <goals>
        <goal>run</goal>
      </goals>
      <configuration>
        <scanIntervalSeconds>0</scanIntervalSeconds>
        <daemon>true</daemon>
      </configuration>
    </execution>
   </executions>          
</plugin>

This works perfectly well while I run ‘mvn test’ from within the foo-cli module (it even stops automatically, with no need to specify anything else). However, when I attempt to go to the upper level (foo) and issue ‘mvn test’ from there, i.e., I try to run all the tests for all the modules in the project, it fails with ‘404 – not found’. From the output, I can see that the overlay (the war dependency) seems to be totally ignored.

Thanks in advance for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:06:39+00:00Added an answer on June 12, 2026 at 12:06 pm

    You should try moving your integration test to the top level project. This way it will run after the WAR artifact has been built.

    Have you had a look at the Maven Failsafe Plugin? It’s designed for the sort of thing you’re doing, which is actually an integration test and not a unit test. The page offers some good advice on why you might want to use the integration-test phase for your integration testing.

    Namely, it describes why you might want to do start-jetty during pre-integration-test and so on, so that you can tear it all down appropriately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a multi-module maven project made up of three sub-modules: web , service
We have a non-trivial multi-module maven project, then have a single module maven web-app
I have a multi-module Maven project that makes use of WAR overlays (stack of
Using maven 3.0.4 I have a multi-module maven project, with some modules producing war
We have a multi-module Maven project who's primary artifact is a WAR. However our
I have a maven multi-module pom which builds a war. I want to declare
I have a maven multi-module project. project-services (service layer..above the dao layer) project-controller (My
I have a multi module web app building with maven. We build the war
I'm new to Maven. I have a multi-module maven 2 project that has the
I have a maven web module in my eclipse project. Is it possible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.