加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pom.xml 18.31 KB
一键复制 编辑 原始数据 按行查看 历史
阿超 提交于 2024-08-27 18:47 . [improve] add jacoco-maven-plugin
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<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>
<groupId>org.dromara.stream-query</groupId>
<artifactId>stream-query</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<modules>
<module>stream-core</module>
<module>stream-plugin</module>
<module>stream-dependencies</module>
<module>stream-parent</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<revision>3.0.0</revision>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<surefire.argLine/>
<maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
<flatten-maven-plugin.version>1.2.7</flatten-maven-plugin.version>
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
<spotless-maven-plugin.version>2.27.2</spotless-maven-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
<apache-rat-plugin.version>0.16.1</apache-rat-plugin.version>
<license-maven-plugin.version>2.4.0</license-maven-plugin.version>
</properties>
<name>Stream Query</name>
<description>允许完全摆脱Mapper的mybatis-plus体验!可以使用类似“工具类”这样的静态函数进行数据库操作</description>
<url>https://github.com/dromara/stream-query</url>
<issueManagement>
<system>Github Issue</system>
<url>https://github.com/dromara/stream-query/issues</url>
</issueManagement>
<organization>
<name>dromara</name>
<url>https://dromara.org</url>
</organization>
<licenses>
<license>
<name>Apache Software License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git@github.com:dromara/stream-query.git</connection>
<developerConnection>scm:git@github.com:dromara/stream-query.git</developerConnection>
<url>git@github.com:dromara/stream-query.git</url>
</scm>
<developers>
<developer>
<name>VampireAchao</name>
<email>vampireachao@dromara.org</email>
<organization>dromara.org</organization>
<roles>
<role>author</role>
</roles>
</developer>
<developer>
<name>Cizai_</name>
<email>zang@dromara.org</email>
<organization>dromara.org</organization>
<roles>
<role>committer</role>
</roles>
</developer>
<developer>
<name>KamTo Hung</name>
<email>kamtohung@gmail.com</email>
<organization>dromara.org</organization>
<roles>
<role>committer</role>
</roles>
</developer>
</developers>
<build>
<plugins>
<!--项目合规-->
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>${apache-rat-plugin.version}</version>
<configuration>
<!-- 排除不需要检查的文件或目录 -->
<excludes>
<exclude>.git/</exclude>
<exclude>.github/**</exclude>
<exclude>.gitignore</exclude>
<exclude>**/.idea/</exclude>
<exclude>**/.gitee/</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/*.txt</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.md</exclude>
<exclude>**/*.log</exclude>
<exclude>**/.gitkeep</exclude>
<exclude>**/.settings/*</exclude>
<exclude>**/.classpath</exclude>
<exclude>**/.project</exclude>
<exclude>**/target/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>.mvn/**</exclude>
<exclude>compiler/**</exclude>
<exclude>mvnw</exclude>
<exclude>mvnw.cmd</exclude>
<exclude>README.md</exclude>
<exclude>node_modules/**</exclude>
<exclude>**/dist/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
</plugin>
<!--maven编译-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
<!--junit5依赖-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<!-- 使用属性值来配置argLine -->
<argLine>${surefire.argLine}</argLine>
</configuration>
</plugin>
<!-- Javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<additionalOptions>-Xdoclint:none</additionalOptions>
<tags>
<tag>
<name>apiNote</name>
<placement>a</placement>
<head>API Note:</head>
</tag>
<tag>
<name>implSpec</name>
<placement>a</placement>
<head>Implementation Requirements:</head>
</tag>
<tag>
<name>implNote</name>
<placement>a</placement>
<head>Implementation Note:</head>
</tag>
<tag>
<name>inheritDoc</name>
<placement>a</placement>
<head>Implementation Note:</head>
</tag>
<tag>
<name>param</name>
</tag>
<tag>
<name>return</name>
</tag>
<tag>
<name>throws</name>
</tag>
<tag>
<name>since</name>
</tag>
<tag>
<name>version</name>
</tag>
<tag>
<name>serialData</name>
</tag>
<tag>
<name>see</name>
</tag>
</tags>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- gav version -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.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>
<!-- 公共checkstyle标准配置,可以在子模块中覆盖,修改自定义选项 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle-plugin.version}</version>
<configuration>
<configLocation>checkstyle/checkstyle.xml</configLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
<encoding>UTF-8</encoding>
<skip>false</skip>
<violationSeverity>error</violationSeverity>
<failsOnError>false</failsOnError>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<licenseHeader>
<file>checkstyle/license-header.txt</file>
</licenseHeader>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<googleJavaFormat>
<version>1.7</version>
<style>GOOGLE</style>
</googleJavaFormat>
<importOrder>
<order>javax,java,\#</order>
</importOrder>
<replaceRegex>
<name>Block powermock</name>
<searchRegex>import\s+org\.powermock\.[^\*\s]*(|\*);(\r\n|\r|\n)</searchRegex>
<replacement>$1</replacement>
</replaceRegex>
<replaceRegex>
<name>Block jUnit4 imports</name>
<searchRegex>import\s+org\.junit\.[^jupiter][^\*\s]*(|\*);(\r\n|\r|\n)</searchRegex>
<replacement>$1</replacement>
</replaceRegex>
<removeUnusedImports/>
</java>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- 这个profile在Java 8或更高版本时激活 -->
<id>java8+</id>
<activation>
<jdk>[8,)</jdk>
</activation>
<properties>
<!-- 重写argLine属性为Java 8+的配置 -->
<surefire.argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens
java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED
</surefire.argLine>
</properties>
</profile>
<profile>
<id>release</id>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>ossrh</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 测试覆盖度 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-maven-plugin.version}</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check/>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</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>
<!-- Gpg Signature -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>ossrh</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<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>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化