ci-springboot-parent-pom
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>de.davelee</groupId> <artifactId>ci-springboot-parent-pom</artifactId> <version>2.3.0</version> </dependency>
<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> <!-- This Parent POM combines Continuous Integration and Spring Boot --> <groupId>de.davelee</groupId> <artifactId>ci-springboot-parent-pom</artifactId> <version>2.3.0</version> <packaging>pom</packaging> <name>Parent POM for Continuous Integration with Spring Boot</name> <description>This is a Maven Parent POM for Continuous Integration using Java with Spring Boot. It includes the standard Spring Boot Starter as Parent POM as well as the Spring Boot Test Starter POM as dependency. In addition, an analysis profile can be called which runs Surefire for JUnit Tests, measures Code Coverage using JaCoCo (version 2.x and higher) or Cobertura (version 1.1.x), generates Documentation using JavaDoc and measures Code Quality using PMD, FindBugs (version 1.1.x only) and Checkstyle.</description> <url>https://www.davelee.de</url> <developers> <developer> <id>1</id> <name>David A J Lee</name> <url>https://www.davelee.de</url> </developer> </developers> <licenses> <license> <name>GNU General Public Licence</name> <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url> <distribution>repo</distribution> </license> </licenses> <!-- Git Connection --> <scm> <connection>scm:git:https://github.com/daveajlee/ci-springboot-parent-pom</connection> <url>https://github.com/daveajlee/ci-springboot-parent-pom</url> <tag>v2.3.0</tag> </scm> <!-- GitHub Packages --> <distributionManagement> <repository> <id>github</id> <name>GitHub daveajlee Apache Maven Packages</name> <url>https://maven.pkg.github.com/daveajlee/ci-springboot-parent-pom</url> </repository> </distributionManagement> <!-- Define variables to enable quick changes including java version and spring boot version --> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>14</java.version> <spring.boot.version>2.3.3.RELEASE</spring.boot.version> <jacoco.version>0.8.5</jacoco.version> <pmd.version>3.13.0</pmd.version> <checkstyle.version>3.1.1</checkstyle.version> </properties> <!-- The Parent POM of this Parent POM is the Spring Boot Starter Parent in the latest release version --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.3.RELEASE</version> </parent> <dependencies> <!-- Add dependency to enable rest controllers i.e. spring-boot-starter-web --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- As dependency also include the spring boot starter test project since projects must have tests! --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <pluginManagement> <plugins> <!-- Ensure that we always compile projects in Java 13 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> <!-- Ensure that the Spring Boot Fat JAR is always runnable --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring.boot.version}</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <!-- The analysis profile runs the following features: JUnit Tests with Surefire, Coberatura Code Coverage, --> <id>analysis</id> <build> <plugins> <!-- JUnit Tests with Surefire --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> <!-- Measure Code Coverage with JaCoCo --> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${jacoco.version}</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <phase>test</phase> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> <!-- Generate Documentation by publishing JavaDoc --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <id>aggregate</id> <phase>install</phase> <goals> <goal>aggregate</goal> </goals> </execution> </executions> </plugin> <!-- Measure Code Quality with PMD --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>${pmd.version}</version> <executions> <execution> <id>install</id> <phase>install</phase> <goals> <goal>pmd</goal> </goals> </execution> </executions> </plugin> <!-- Use checkstyle to ensure good code style --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>${checkstyle.version}</version> <executions> <execution> <id>install</id> <phase>install</phase> <goals> <goal>checkstyle</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>