Skip to content

Commit

Permalink
ci: IFS-4169 updated pom.xml to include necessary metadata and plugin…
Browse files Browse the repository at this point in the history
…s for deploying to Maven Central, gpg signing, sbom generation
  • Loading branch information
huy-tran-msg committed Oct 9, 2024
1 parent 2220a40 commit f8f210a
Showing 1 changed file with 237 additions and 31 deletions.
268 changes: 237 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,61 @@

<groupId>de.bund.bva.isyfact</groupId>
<artifactId>isy-util</artifactId>
<version>${revision}</version>
<packaging>jar</packaging>
<name>IsyFact: Utilities</name>
<version>4.0.0-SNAPSHOT</version>

<name>IsyFact-Utilities</name>
<description>Stellt Hilfsfunktionen für IsyFact-Anwendungen bereit.</description>
<url>http://isyfact.de</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<developers>
<developer>
<name>IsyFact-Team</name>
<email>[email protected]</email>
<organization>Bundesverwaltungsamt (BVA)</organization>
<organizationUrl>https://www.bva.bund.de</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/IsyFact/isy-util.git</connection>
<developerConnection>scm:git:ssh://github.com:IsyFact/isy-util.git</developerConnection>
<url>https://github.com/IsyFact/isy-util</url>
</scm>

<properties>
<revision>4.0.0-SNAPSHOT</revision>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<jacoco.plugin.version>0.8.7</jacoco.plugin.version>
<surefire.plugin.version>2.22.2</surefire.plugin.version>
<maven.compiler.version>3.11.0</maven.compiler.version>

<spring.framework.version>6.1.4</spring.framework.version>
<spring-boot.version>3.3.3</spring-boot.version>
<hibernate.core.version>6.5.2.Final</hibernate.core.version>
<slf4j.version>2.0.13</slf4j.version>
<junit.version>4.13.2</junit.version>
<mockito.core.version>5.4.0</mockito.core.version>
<logback-classic.version>1.5.6</logback-classic.version>
<logstash-logback-encoder.version>8.0</logstash-logback-encoder.version>
<maven.surefire.version>3.1.2</maven.surefire.version>
<maven.jar.version>3.3.0</maven.jar.version>
<maven.deploy.version>2.8.2</maven.deploy.version>
<maven.flatten.version>1.2.7</maven.flatten.version>
<maven.jacoco.version>0.8.7</maven.jacoco.version>
<maven.cyclondx.version>2.7.11</maven.cyclondx.version>
<maven.javadoc.plugin.version>3.3.2</maven.javadoc.plugin.version>
<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
<junit.vintage.version>5.10.0</junit.vintage.version>
<junit.version>4.13.2</junit.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<dependencies>
Expand Down Expand Up @@ -92,38 +125,211 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${maven.jacoco.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>${maven.cyclondx.version}</version>
<configuration>
<outputFormat>json</outputFormat>
<outputName>${project.artifactId}-${project.version}-cyclonedx</outputName>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
<configuration>
<!-- The encoding is important for the representation of special characters. -->
<encoding>${project.build.sourceEncoding}</encoding>
<charset>${project.build.sourceEncoding}</charset>
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${maven.flatten.version}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven.deploy.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.plugin.version}</version>
<configuration>
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>centralRelease</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>GPGsigning</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<keyname>${gpg.keyname}</keyname>
<passphrase>${gpg.passphrase}</passphrase>
<!-- Prevent gpg from using pinentry programs -->
<!-- Required for compatibility with gpg version 2.1 or later -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit f8f210a

Please sign in to comment.