Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a bill of materials (BOM) POM #1503

Open
marschall opened this issue Aug 29, 2023 · 2 comments
Open

Add a bill of materials (BOM) POM #1503

marschall opened this issue Aug 29, 2023 · 2 comments

Comments

@marschall
Copy link
Contributor

It would be nice if the project provided a Bill of Materials (BOM) POMs that contain all the artifacts of the project.

Many projects like Spring and JUnit provide BOM POMs so that versions have to be specified only once.

Right now if somebody wants to use Eclipse Collections the version has to be specified twice.

<dependencies>
  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections-api</artifactId>
    <version>11.1.0</version>
  </dependency>

  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections</artifactId>
    <version>11.1.0</version>
  </dependency>

With a BOM POM the version has to be specified only once.

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.collections</groupId>
      <artifactId>eclipse-collections-bom</artifactId>
      <version>11.1.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections-api</artifactId>
  </dependency>

  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections</artifactId>
  </dependency>
</dependencies>

It is a bit more verbose. There are other solutions for this like properties. Using BOM POMs is completely optional to users.

@danthe1st
Copy link

If both dependencies should have the same version, you can also use properties:

<properties>
  <eclipse-collections.version>11.1.0</eclipse-collections.version>
</properties>
<dependencies>
  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections-api</artifactId>
    <version>${eclipse-collections.version}</version>
  </dependency>

  <dependency>
    <groupId>org.eclipse.collections</groupId>
    <artifactId>eclipse-collections</artifactId>
    <version>${eclipse-collections.version}</version>
  </dependency>
</dependencies>

@AnamuddinAhmad
Copy link

Hello sir,
"I'm eager to make a meaningful contribution to this codebase and help resolve any issues that may arise."

@donraab donraab assigned motlin and unassigned motlin Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants