Base Parent pom extension for Avro


License

License

GroupId

GroupId

com.github.frtu.governance
ArtifactId

ArtifactId

base-avro-pom
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

pom
Description

Description

Base Parent pom extension for Avro
Base Parent pom extension for Avro

Download base-avro-pom

Filename Size
base-avro-pom-1.1.0.pom 7 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.frtu.governance/base-avro-pom/ -->
<dependency>
    <groupId>com.github.frtu.governance</groupId>
    <artifactId>base-avro-pom</artifactId>
    <version>1.1.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.frtu.governance/base-avro-pom/
implementation 'com.github.frtu.governance:base-avro-pom:1.1.0'
// https://jarcasting.com/artifacts/com.github.frtu.governance/base-avro-pom/
implementation ("com.github.frtu.governance:base-avro-pom:1.1.0")
'com.github.frtu.governance:base-avro-pom:pom:1.1.0'
<dependency org="com.github.frtu.governance" name="base-avro-pom" rev="1.1.0">
  <artifact name="base-avro-pom" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.github.frtu.governance', module='base-avro-pom', version='1.1.0')
)
libraryDependencies += "com.github.frtu.governance" % "base-avro-pom" % "1.1.0"
[com.github.frtu.governance/base-avro-pom "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Maven artefact generator

Note : The artecfacts below all rely on base-pom that helps to normalize all the libraries CVE fixes and version upgrades.

Feel free to inline some of the dependencies or all dependencies & remove dependency to this pom.xml (it's a template).

Overview

Allow to generate a project for :

  • Base project (Label : base) : suitable for lib, command line, ...
  • Spring Boot project (Label : spring-boot) : suitable for web project (backend or frontend)
  • Kotlin Base project (Label : kotlin) : for kotlin project, ...
  • Kotlin Spring Boot project (Label : kotlin-spring-boot) : for Kotlin Spring Boot project

NOTE : when using mvngen, just append the project label.

Ex :

  • mvngenlocal base cmd : generate a base project called cmd
  • mvngenlocal spring-boot web : generate a spring-boot artifact for called web
  • mvngenlocal kotlin kt-base : generate a Kotlin base project called kt-base
mvn archetype:generate -DarchetypeGroupId=com.github.frtu.archetype \
-DarchetypeArtifactId=kotlin-project-archetype -DarchetypeVersion=1.1.2 \
-DgroupId=com.github.frtu -DartifactId=kt-base -Dversion=0.0.1-SNAPSHOT

Catalog

A Module is a standalone project with one single pom OR can be hosted in a Platform projet.

A Platform means that it comes with a parent pom, hosting a sub project. When you generate another module at its root folder, the new module is append next to the others.

Generate archetypes with the below commands :

  • Replace x.y.z with the latest version

Module - Base

Base project are generated for libraries or command line. Just include :

  • Loggers using log-platform
  • Maven plugin for Code Coverage (jacoco) & code quality (spotbugs)

Build will fail if SpotBugs find issues with FindBugs. See Bugs descriptions at http://findbugs.sourceforge.net/bugDescriptions.html

Module - Spring Boot

Allow to generate a spring-boot project based on a basic template.

Override version - version 1.1.2

You can override sprint-boot version by

  • checking available version in the repo
  • Override maven generator properties by saying N
  • Override property value that you need (else just type [Enter])

Module - Kotlin

Base project for Kotlin. You can get started with Kotlin from :

Override version - version 1.1.2

You can override kotlin version by

  • checking available version in the repo
  • Override maven generator properties by saying N
  • Override property value that you need (else just type [Enter])

Sample stack :

Confirm properties configuration:
groupId: com.github.frtu
artifactId: kt-base
version: 0.0.1-SNAPSHOT
package: com.github.frtu
base-pom-version: 1.1.2
kotlin-version: 1.4.21
 Y: : N
[INFO] Using property: groupId = com.github.frtu
[INFO] Using property: artifactId = kt-base
[INFO] Using property: version = 0.0.1-SNAPSHOT
Define value for property 'package' com.github.frtu: :
Define value for property 'base-pom-version' 1.1.2: :
Define value for property 'kotlin-version' 1.4.21: : 1.4.20
Confirm properties configuration:
groupId: com.github.frtu
artifactId: kt-base
version: 0.0.1-SNAPSHOT
package: com.github.frtu
base-pom-version: 1.1.2
kotlin-version: 1.4.20
 Y: : Y

Module - Kotlin Spring Boot

Sync vs Async mode

By default, Kotlin spring-boot comes with Synchronous pattern. If you want to switch to Asynchronous, just uncomment :

  • pom.xml : Search for ASYNCHRONOUS and uncomment webflux.

Async persistence

If storage needed, use JPA for sync or r2dbc for async.

  • pom.xml : there are 3 sections marked with JPA to uncomment
  • application.properties : uncomment the DB URLs
  • Application.kt : uncomment @EnableR2dbcRepositories

Going forward

  • Allow async data ingestion with spring-boot and webflux
  • Expand on data governance & processing with Avro and Spark

~ Have fun !

Versions

Version
1.1.0