Skip to content

krakenninja/kraken-bom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bills of Material (BOM)

Following the common BOM that any projects can include/inherit from

🛠️ Pre-requisites

Following are the pre-requisites to run the following module :

  • Java (version used 22.0.2)
  • Maven (version used 3.9.6)

⚛ Developer Notes

The BOM should contain all if-not most of the dependencies that other modules can inherit from. This BOM is a child of the org.springframework.boot::spring-boot-starter-parent ; so this means it is fully capable to be used if you need a Spring Boot application typed

Pre-requisites (Deploy)

Before you can perform the command mvn clean install deploy -Dsnapshot —OR— mvn clean install deploy -Drelease, the following settings are required in your Maven Settings (i.e. ~/.m2/settings.xml)

<servers>
  <server>
    <id>github-krakenninja</id>
    <username>$USERNAME</username>
    <password>$TOKEN</password>
    <passphrase>$TOKEN</passphrase>
  </server>
</servers>

Deploy locally

Following is used to deploy locally into your Maven Local Repository (i.e ~/.m2/repository). This is primarily useful if you would like to add/modify the existing pom.xml and test whether it works for you in your own project/module

ℹ️ INFORMATION
DEFAULT installs as release for the version, you can change this in command as well by using the property -Dchangelist=-SNAPSHOT

Example : mvn clean install -Dchangelist=-SNAPSHOT

Below is the command to use :

mvn clean install

Deploy snapshot

Following is used to deploy a $VERSION-SNAPSHOT into the GitHub Packages

ℹ️ INFORMATION
MULTIPLE deploy snapshot for the same version is allowed (but NOT RECOMMENDED). Only the latest will be used when it is included in your project pom.xml

Below is the command to use :

mvn clean install deploy -Dsnapshot

Deploy release

Following is used to deploy a $VERSION-RELEASE into the GitHub Packages and GitHub Releases

⚠️ IMPORTANT
‼️ DO NOT deploy release for the same version ever. Please MAKE SURE you change the pom.xml revision accordingly before performing the deploy release

‼️ ALWAYS PREPARE the release notes that is located in source folder release-notes.md

Below is the command to use :

mvn clean install deploy -Drelease

⚠️ Notes

Before you actually perform the deploy operation, ensure that the <project><version> is proper ; otherwise GitHub will throw HTTP error Conflict (409). You can check what is released and/or packaged before you run the deploy command against the pom.xml under the properties section ; change/manage only the revision element

<project>
  <properties>
    <revision>$VERSION</revision>
  </properties>
</project>

Generally the practices before deploying are :

  1. Check deployment pre-requisites
  2. Check pom.xml source version (change if you need)
  3. Check GitHub kraken-bom repository to ensure no duplicated version(s) in either the released and/or packages
  4. Commit and push latest changes if any (see Step #2)
  5. Run the deploy command mentioned in the Deploy xxxx section above

Using the BOM

There are TWO(2) ways that you can make use of this BOM

Pre-requisites (Usage As ...)

  • Your project pom.xml will need the following repository defined :
<project>
  <repositories>
    <repository>
      <id>github-krakenninja</id>
      <name>GitHub KrakenNinja Packages</name>
        <url>https://maven.pkg.github.com/krakenninja/kraken-bom</url>
    </repository>
  </repositories>
</project>

1️⃣ As dependency

  • You get the dependency versions decided globally by the BOM itself
  • You get to maintain your POM with your own parent structure
  • Sample snippet to declare in your own pom.xml :
<dependencies>
  <dependency>
    <groupId>com.github.krakenninja</groupId>
    <artifactId>kraken-bom</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <type>pom</type>
    <scope>import</scope>
  </dependency>
</dependencies>

2️⃣ As parent

  • You get the dependency versions managed for you by the BOM itself
  • You get Maven plugin configurations and executions prepared
  • You get Maven common properties inherited (and you can override it by redefining in your POM <properties> section
  • Sample snippet to declare in your own pom.xml :
<parent>
  <groupId> com.github.krakenninja </groupId>
  <artifactId>kraken-bom</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</parent>

📚 References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published