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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:09:07+00:00 2026-06-10T22:09:07+00:00

How do I exclude a dependency in provided scope when running in Maven test

  • 0

How do I exclude a dependency in provided scope when running in Maven test scope? I have an unusual use case where I need to exclude a particular provided implementation and replace it with another in the test cases. It seems that Maven tests always include other scopes as well but in my case I want to make some exception. How do I do this?

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

    There are situations where you need to run your tests in a different module. That may be what you need here. It allows your tests to use different dependencies, properties and version of Java etc.

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

Sidebar

Related Questions

I want to exclude one dependency when I'm doing deploy, I need it when
We use maven to build Flex SWF applications. These SWF artifacts have a couple
In Maven2, to exclude a single transitive dependency, I have to do something like
I am using Ivy for dependency managment. I have problems with maven-findbgs-plugin:plugin:1.3.1 maven-cobertura-plugin:plugin:1.3 There
Just got head into Maven and I've got situation where I have cyclic dependency
I see maven-dependency-plugin does this; however, it seems to copy everything (including test jars)
I have a question about exclusion of maven dependencies. Consider the following <dependency> <groupId>org.springframework.security</groupId>
i exclude all tests in plugin except my test suite: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.11</version>
I have a case where I want a dependency on the runtime classpath but
For example I have dependency: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.5.6</version> </dependency> Can I exclude one

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.