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

  • SEARCH
  • Home
  • 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 6050309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:40:26+00:00 2026-05-23T07:40:26+00:00

How to set Maven dependency for all org.springframework ? I mean, how to do

  • 0

How to set Maven dependency for all org.springframework ?

I mean, how to do it in couple lines,instead of providing dependency for every module,e.g.:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>3.0.5.RELEASE</version>
</dependency>

etc..

thank you for 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-05-23T07:40:26+00:00Added an answer on May 23, 2026 at 7:40 am

    As noted in other answers, you only want to use what you actually need, e.g. if you need the Spring Web framework, then get that. However, you can greatly simplify and reduce the set of dependencies listed in your pom.xml by doing a bit of dependency analysis and only specifying the highest level of required dependency.

    So for example, suppose you have the following dependencies (note that I’m using the artifact IDs for the Spring EBR repository instead of Maven Central; see this article for more info on the difference):

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.context</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.web.servlet</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.transaction</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    

    As it happens, though, the Spring Web stuff actually already has a dependency on the context library, so you can just remove the context reference:

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.web.servlet</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.transaction</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    

    This will get you the context library without specifically referencing it, since it’s brought in implicitly by the dependency in the Web library.

    If you have IntelliJ or m2eclipse or something like that in your IDE, you can get these dependencies displayed right in the IDE, either through a dependency hierarchy display or even in a dependency graph, which is basically a UML chart.

    For stand-alone Maven, I think you just do:

    mvn dependencies:list
    

    More on the dependencies plugin is on the plugin site.

    This approach keeps your dependencies very explicit and your application footprint much smaller, which is basically what everyone else is warning about, but can reduce the number of dependencies you have to list in your pom.xml, which is what I think you’re trying to solve.

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

Sidebar

Related Questions

In Maven, dependencies are usually set up like this: <dependency> <groupId>wonderful-inc</groupId> <artifactId>dream-library</artifactId> <version>1.2.3</version> </dependency>
<dependency> <groupId>org.papervision3d</groupId> <artifactId>Papervision3D</artifactId> <version>2.1.932</version> <type>swc</type> <downloadUrl>http://papervision3d.googlecode.com/files/Papervision3D_2.1.932.swc</downloadUrl> </dependency> I'm supposed to use downloadUrl tag, but
I have following Maven projects set up: PM-Core PM-Web (with a dependency to PM-Core)
I've got an Ant task (using the maven task) set up to automatically download
I set up a new webapp Maven project and wanted to test it with
i'm trying to set up the selenium-maven-plugin and having some difficulties i hope somebody
just set up a simple project to test the functionality of the maven exec
i want maven to download custom jar files from an ftp how to set
I have a maven project that has a set of library dependancies that are
Is it possible to have a different set of dependencies in a maven pom.xml

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.