Following the common BOM
that any projects can include/inherit from
Following are the pre-requisites to run the following module :
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
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
)
- Ensure you had generated and obtained your GitHub Personal Access Token (PAT)
- Add a new
<server>
section with the following content :
<servers>
<server>
<id>github-krakenninja</id>
<username>$USERNAME</username>
<password>$TOKEN</password>
<passphrase>$TOKEN</passphrase>
</server>
</servers>
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 : |
Below is the command to use :
mvn clean install
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
Following is used to deploy a $VERSION-RELEASE
into the GitHub Packages and GitHub Releases
release for the same version ever. Please MAKE SURE you change the pom.xml revision accordingly before performing the deploy release |
Below is the command to use :
mvn clean install deploy -Drelease
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 :
- Check deployment pre-requisites
- Check
pom.xml
source version (change if you need) - Check GitHub kraken-bom repository to ensure no duplicated version(s) in either the released and/or packages
- Commit and push latest changes if any (see Step #2)
- Run the deploy command mentioned in the
Deploy xxxx
section above
There are TWO(2) ways that you can make use of this BOM
- 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>
- 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>
- 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 yourPOM
<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>