feat: added comments and readme
This commit is contained in:
47
README.MD
Normal file
47
README.MD
Normal file
@@ -0,0 +1,47 @@
|
||||
# SFG SB Common
|
||||
This project contains common code shared by all spring boot projects build for Sligro Food Group.
|
||||
|
||||
## Projects
|
||||
- spring-boot-parent
|
||||
- spring-boot-common-utils
|
||||
|
||||
### spring-boot-parent
|
||||
This project is intended to be consumed by other projects as their parent.
|
||||
It inherits from the spring-boot-starter-parent from the Spring project it self.
|
||||
|
||||
It also specifies the versions of all other sfg-sb-common projects, so that any consumer can easily obtain a compatible version for their project.
|
||||
|
||||
### spring-boot-common-utils
|
||||
This project defines some common utilities which will be used by most projects. Like:
|
||||
- logging
|
||||
|
||||
See the README in that folder for more details.
|
||||
|
||||
## Adding a project
|
||||
To add a new project, a few steps need to be taken.
|
||||
|
||||
- A new maven module needs to be created
|
||||
- It should define the root project as it's parent (NOTE: this is not the spring-boot-parent module)
|
||||
- It should NOT define a group id or a version
|
||||
- It should define an SCM section
|
||||
- It should NOT a distribution section
|
||||
- It should be added to the `<modules>` section in the root pom
|
||||
- It should be added to the `<dependencyManagement>` section of the spring-boot-parent pom
|
||||
|
||||
// TODO: improve this section
|
||||
|
||||
## Releasing
|
||||
// TODO: create a Jenkins pipeline for this
|
||||
|
||||
A release should be done using the maven release plugin.
|
||||
|
||||
In GIT, it will create a commit with the exact version, tag it and create a commit with the next version.
|
||||
|
||||
In Maven it will set the exact version (without snapshot). Both as the project version, as well as the dependency management versions.
|
||||
|
||||
To create a release, execute:
|
||||
- `mvn release:prepare`
|
||||
- `mvn release:perform`
|
||||
|
||||
Optionally add `--batch-mode` to `mvn` to make Maven non-interactive.
|
||||
Otherwise, accept the default versions provided by release plugin.
|
||||
@@ -15,12 +15,6 @@
|
||||
|
||||
<artifactId>lib-1</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
|
||||
8
pom.xml
8
pom.xml
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<scm>
|
||||
<connection>scm:git:ssh://gitea@gitea.rickrongen.nl:8789/RickRongen/tmp-sbcommon.git</connection>
|
||||
<url>ssh://gitea@gitea.rickrongen.nl:8789/RickRongen/tmp-sbcommon.git</url>
|
||||
<url>https://gitea.rickrongen.nl/RickRongen/tmp-sbcommon</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<!--
|
||||
These properties are shared within this repository, but they are NOT used by the spring-boot-parent module
|
||||
Any consumers of the parent module thus don't get these properties.
|
||||
-->
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -36,10 +40,10 @@
|
||||
<configuration>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
<projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId>
|
||||
<!--NOTE: below uses an `@`, which is parsed by the release plugin instead-->
|
||||
<tagNameFormat>v@{project.version}</tagNameFormat>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
@@ -14,14 +14,11 @@
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<!--
|
||||
These projects only need an artifact id. The version and group id are taken from the parent.
|
||||
-->
|
||||
<artifactId>spring-boot-common-utils</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<scm>
|
||||
<connection>scm:git:ssh://gitea@gitea.rickrongen.nl:8789/RickRongen/tmp-sbcommon.git</connection>
|
||||
<url>ssh://gitea@gitea.rickrongen.nl:8789/RickRongen/tmp-sbcommon.git</url>
|
||||
<url>https://gitea.rickrongen.nl/RickRongen/tmp-sbcommon</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<parent>
|
||||
@@ -12,14 +12,6 @@
|
||||
<version>3.5.5</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>tmp</id>
|
||||
<name>Test</name>
|
||||
<url>file://local/Users/rickrongen/IdeaProjects/sfg-sb-common/tmp-repo</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<groupId>com.sligrofoodgroup.spring-boot-common</groupId>
|
||||
<artifactId>spring-boot-parent</artifactId>
|
||||
@@ -27,9 +19,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<org.jetbrains.annotations>24.1.0</org.jetbrains.annotations>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -50,8 +40,16 @@
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>24.1.0</version>
|
||||
<version>${org.jetbrains.annotations}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>tmp</id>
|
||||
<name>Test</name>
|
||||
<url>file://local/Users/rickrongen/IdeaProjects/sfg-sb-common/tmp-repo</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user