It most cases when we need maven, we need a parent child like structure. I personally like to start my projects with a parent bom file where I manage all my dependencies and plugins. https://unsplash.com/@vikceo <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>commons</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <parent> <groupId>com.sergiuoltean.test</groupId> <artifactId>bom</artifactId> <version>1.0-SNAPSHOT</version> <relativePath/> </parent> </project> Now… Continue reading Maven parent version
Category: Maven
Maven Archetypes
We found a structure that works for our service.(eg clean architecture). That means we have a domain layer, a data access and application layer and of course our presentation layer which can be a rest endpoints layer. Now we want all our services to respect this structure and also we don't want to manually copy… Continue reading Maven Archetypes
Maven BOM
BOM stands for Bill of Materials. Basically we can use it to store in one place all the dependencies with their versions. It's useful in the case microservices are used to make sure same versions are used everywhere. Of course this is not necessarily a requirement for microservices, as you have the choice to build… Continue reading Maven BOM
Maven. Share properties between modules.
We have the following situation: a set of global properties and multiple maven modules. Some properties are required by something inside a module, others are required by another module. How can we achieve this? One way would be to have a copy of the properties available for each module. It will work, but it's not… Continue reading Maven. Share properties between modules.