git sonar maven 配置

复制代码
<plugins>
    <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>${git-commit-id-plugin.version}</version>
        <executions>
            <execution>
                <id>get-the-git-infos</id>
                <goals>
                    <goal>revision</goal>
                </goals>
            </execution>
            <execution>
                <id>validate-the-git-infos</id>
                <goals>
                    <goal>validateRevision</goal>
                </goals>
                <phase>package</phase>
            </execution>
        </executions>

        <configuration>
            <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
            <!-- that's the default value, you don't have to set it -->
            <prefix>git</prefix>
            <verbose>false</verbose>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
            </generateGitPropertiesFilename>
            <gitDescribe>
                <skip>false</skip>
                <always>false</always>
                <dirty>-dirty</dirty>
            </gitDescribe>
        </configuration>
    </plugin>


    <!-- sonar插件配置 start -->
    <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <configuration>
            <skip>${maven.test.skip}</skip>
            <destFile>${basedir}/target/jacoco.exec</destFile>
            <output>file</output>
            <append>true</append>
        </configuration>
        <executions>
            <execution>
                <id>jacoco-initialize</id>
                <goals>
                    <goal>prepare-agent</goal>
                </goals>
                <phase>test-compile</phase>
            </execution>

            <execution>
                <id>jacoco-site</id>
                <phase>verify</phase>
                <goals>
                    <goal>report</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    <!-- sonar插件配置 end -->

</plugins>
相关推荐
武子康4 小时前
大数据-128 - Flink 并行度详解:从概念到最佳实践,一文读懂任务并行执行机制 代码示例与性能优化
大数据·后端·flink
望获linux5 小时前
【实时Linux实战系列】使用 u-trace 或 a-trace 进行用户态应用剖析
java·linux·前端·网络·数据库·elasticsearch·操作系统
dessler5 小时前
Elasticsearch(ES)-Logstash
linux·运维·elasticsearch
云中隐龙5 小时前
mac使用本地jdk启动elasticsearch解决elasticsearch启动时jdk损坏问题
java·elasticsearch·macos
望获linux5 小时前
【实时Linux实战系列】FPGA 与实时 Linux 的协同设计
大数据·linux·服务器·网络·数据库·fpga开发·操作系统
励志成为糕手6 小时前
宽依赖的代价:Spark 与 MapReduce Shuffle 的数据重分布对比
大数据·spark·mapreduce·分布式计算·sortshuffle
Elastic 中国社区官方博客10 小时前
根据用户行为数据中的判断列表在 Elasticsearch 中训练 LTR 模型
大数据·数据库·人工智能·elasticsearch·搜索引擎·ai·全文检索
点控云11 小时前
点控云智能短信:重构企业与用户的连接,让品牌沟通更高效
大数据·人工智能·科技·重构·外呼系统·呼叫中心
风清再凯13 小时前
04_es原理&filebeat使用
大数据·elasticsearch·搜索引擎
小小王app小程序开发13 小时前
盲盒小程序开发新视角:从用户体验到运营落地的分析拆解
大数据·ux