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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:10:30+00:00 2026-06-13T07:10:30+00:00

I have several independent projects (they don’t have the same parent) but they use

  • 0

I have several independent projects (they don’t have the same parent) but they use the same set of libraries. For example

  • Project A
  • Project B
  • Project C

All these projects use Spring, Postgres, Hibrenate and tomcat. What I want to do is introduce the concept of a named collection of dependecies somethnig along the following lines:

  • TSHP 1.0 – Might consist of tomcat 6.0.35, Spring 3.0.7, Hibernate 3.6.8 … etc
  • TSHP 2.0 – Might consist of tomcat 7.0.32, Spring 3.1.2, Hibernate 4.1.7 .. etc

I want to be able to say something like Project A depends on TSHP 1.0, Project B depends on TSHP 2.0
… etc. The value I see for this type of setup is

  • It is easy to standardize on a set of common libraries that are used as a group with a company, so auditing across projects is easy, you don’t have to dig into a project’s pom to see what is there if you know that it is using a named group of dependencies
  • Starting a new project with the standard classpath could very easy because It should be possible to just include a single dependency on the named group and get everything that is needed for that type of application, only one person needs to figure out and verify that the combination of jars in the named class-path really works well with each other.

Can this type of setup be done with maven3? If so How?

Update: The problem I see with the parent pom setup is that there can only be one parent for a POM, but I might have several standard named class-paths, for example:

  • WEB_SECURITY – might be a collection of jars that are used to protect against common web security issues, so an web app might include TSHP + WEB_SECURITY while a batch app might only include TSHP. Composition is better than inheritance and is much more flexible.
  • 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-13T07:10:31+00:00Added an answer on June 13, 2026 at 7:10 am

    Create a new project for the ‘platform’, i.e. the group of dependencies that you want to use together. Its packaging type should be: pom.

    <project>
        <groupId>…</groupId>
        <artifactId>tshp-platform</artifactId>
        <version>1.0</version>
        <packaging>pom</packaging>
        <dependencies>
          <!-- Dependencies for TSHP 1.0 -->
        </dependencies>
    …
    

    Release 1.0 of the the pom. Then update the version and dependencies for TSHP 2.0. Then release that.

    Now your projects can simply declare a dependency on the pom project, and will pick up the platform transitively.

    However, note that it’s often considered good practice to explicitly declare artifacts that each individual project directly depends on. However, that’s not essential.

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

Sidebar

Related Questions

We have several independent builds (each independent build is a multi-project build). The main
We have several independent modules (e.g. mod1, mod2, mod3 ...) under a project 'proj1'.
We have several C++ projects that were built from the same codebase. There's a
At my company we have several pseudo-independent teams, owning several repositories each (but sometimes
Under the same subdomain, I need to set up several independent sites each running
I run a rather complex project with several independent applications. These use however a
I'm trying to use different modules (with independent wscript files) across several projects, so
I'm building a single-page application. At the moment, I also have several independent pages
My application has several independent top-level windows, which all have completely different functions/workflows. I
I have read several articles and questions on concept of foreign key vs independent

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.