distributed-lock-mongodb-parent
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>io.github.daggerok</groupId>
<artifactId>distributed-lock-mongodb-parent</artifactId>
<version>3.3.2</version>
</dependency><?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<modules>
<module>docker</module>
<module>testcontainers</module>
<module>distributed-lock-mongodb</module>
<module>distributed-lock-mongodb-spring-boot-starter</module>
<module>distributed-lock-mongodb-spring-boot-starter-example</module>
</modules>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.daggerok</groupId>
<artifactId>distributed-lock-mongodb-parent</artifactId>
<version>3.3.2</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Distributed Lock based on MongoDB and Spring Boot 3.x</description>
<url>https://github.com/daggerok/distributed-lock-mongodb-spring-boot-starter</url>
<developers>
<developer>
<name>Maksim Kostromin</name>
<email>daggerok@gmail.com</email>
<organization>Sets of open source Maksim Kostromin aka daggerok projects</organization>
<organizationUrl>https://github.com/daggerok/</organizationUrl>
</developer>
</developers>
<organization>
<name>Maksim Kostromin aka daggerok open source projects sets</name>
<url>https://github.com/daggerok/</url>
</organization>
<licenses>
<license>
<name>MIT License</name>
<distribution>repo</distribution>
<!-- <url>https://opensource.org/licenses/MIT</url> -->
<url>https://github.com/daggerok/distributed-lock-mongodb-spring-boot-starter/blob/master/LICENSE</url>
</license>
</licenses>
<scm>
<developerConnection>scm:git:git@github.com:daggerok/distributed-lock-mongodb-spring-boot-starter.git</developerConnection>
<connection>scm:git:https://github.com/daggerok/distributed-lock-mongodb-spring-boot-starter.git</connection>
<url>https://github.com/daggerok/distributed-lock-mongodb-spring-boot-starter/tree/master</url>
<!-- <tag>master</tag> -->
<tag>HEAD</tag>
</scm>
<properties>
<java.version>17</java.version>
<vavr.version>0.10.4</vavr.version>
<testcontainers.version>1.20.1</testcontainers.version>
<docker-maven-plugin.version>0.45.0</docker-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<gpg.skip>true</gpg.skip>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<scope>provided</scope>
</dependency>
<!--suppress VulnerableLibrariesLocal: checkmarx vulnerability report. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>clean verify</defaultGoal>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<doclint>none</doclint>
<failOnError>false</failOnError>
<failOnWarnings>false</failOnWarnings>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<skip>${gpg.skip}</skip>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>512</maxmemory>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>read gpg.passphrase system property</id>
<!--
This profile will pick `gpg.passphrase` java system property to configure maven-gpg-plugin passphrase implicitly
./mvnw -Dgpg.passphrase=...
-->
<activation>
<property>
<name>gpg.passphrase</name>
</property>
</activation>
<properties>
<gpg.skip>false</gpg.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>read GPG_PASSPHRASE environment variable</id>
<!--
This profile will pick `GPG_PASSPHRASE` environment variable to configure maven-gpg-plugin passphrase implicitly
GPG_PASSPHRASE=... ./mvnw ...
-->
<activation>
<property>
<name>env.GPG_PASSPHRASE</name>
</property>
</activation>
<properties>
<gpg.skip>false</gpg.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
<!-- Prevent `gpg` from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>central-release</id>
<!--
This profile mainly must be used to release project artifacts to central maven repository
Prerequisites are:
- gpg install, private key with passphrase generated
- maven pom.xml required plugins added and configured with proper profiles
Workflow:
- Let's say your version is x.y.z-SNAPSHOT
./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout
- Then you can deploy snapshot version to maven central just like so:
GPG_PASSPHRASE=... ./mvnw -P central-release clean deploy
- When testing of deployed x.y.z-SNAPSHOT is done, you can change version to released: x.y.z-SNAPSHOT -> x.y.z
./mvnw build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.incrementalVersion}
- If something goes wrong, you can simply revert last change with help of previously created pom.xml.versionsBackup files:
./mvnw build-helper:parse-version versions:revert
- Otherwise commit, this will remove all generated pom.xml.versionsBackup files:
./mvnw build-helper:parse-version versions:commit
- Let's commit release version with these commands:
VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
git add . ; git commit -am "Release $VERSION version manually." ; git push origin master
- And release x.y.z version artifacts to maven central:
GPG_PASSPHRASE=... ./mvnw -P central-release clean deploy
- It's time to create and push GitHub tag released version:
git tag $VERSION ; git push origin $VERSION
- Finally create next SNAPSHOT version for future development iteration: x.y.z -> x.y.(z+1)-SNAPSHOT
./mvnw build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT
./mvnw build-helper:parse-version versions:commit
VERSION=`mvn help:evaluate -Dexpression=project.version -q -DforceStdout`
git add . ; git commit -am "Start next $VERSION development iteration." ; git push origin master
see: https://central.sonatype.org/publish/publish-maven/#nexus-staging-maven-plugin-for-deployment-and-release
-->
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<defaultGoal>clean deploy</defaultGoal>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<!--<nexusUrl>https://oss.sonatype.org/</nexusUrl>-->
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<tags>
<localUsername>${env.USER}</localUsername>
<javaVersion>${java.version}</javaVersion>
</tags>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>