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 8460419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:36:08+00:00 2026-06-10T13:36:08+00:00

Hi I have a maven project which needs to deploy 2 wars to a

  • 0

Hi I have a maven project which needs to deploy 2 wars to a jetty environment before integration testing starts. These wars are no dependencies of the project in the normal sence, but they need to be deployed seperatly for the integration tests to work property.

I have done this by adding test dependencies for the 2 wars. I then use the maven-dependency-plugin’s copy-dependencies goal to copy the wars to a new directory and strip their version numbers so that jetty can find and deploy them using the org.mortbay.jerry.jetty-maven-plugin as part of the pre-integration-test phase.

My problem is that despite the fact the new dependencies are test scope maven is still overlaying them onto this projects war.

Does anyone know how to add a dependency on a war which only downloads the dependency but doesn’t do anything more with it?

  • 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-10T13:36:09+00:00Added an answer on June 10, 2026 at 1:36 pm

    I would do this by creating a separate Maven module just for integration testing. Once you do this, you can set the <packaging> type to pom and thus eliminate the problem with the WAR overlays. Just include the two integration testing WARs as dependencies along with the WAR you need to test/verify.

    Doing this also allows for a clean separation of the build process from the integration testing process, which can help in other ways.

    If you do not like this idea, then use the WAR plugin’s <dependentWarExcludes> configuration to keep your testing WARs out of your WAR packaging. See here for details:

    http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html

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

Sidebar

Related Questions

I have maven-gwt project. It has lots of dependencies which is usual by a
I have a maven project , which needs to copy webapp/WEB-INF/ resources from another
I have a maven project which won't compile due to an unresolvable reference from
I have a Maven project which performs a number of time consuming tests as
Currently, I have a Maven project which inherits from a parent pom defining two
I have a maven project A which uses jar files of another project B
I have a maven Java project (Project A) which depends on a second project
For my Java project which uses Maven I have added Twitters Bootstrap lately to
I have a Jenkins build which builds a maven project with -PmyProfile clean package
I have a maven multiple-module project, which is giving me headaches in the assembly:assembly

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.