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>
相关推荐
Me4神秘7 小时前
国家级互联网骨干直联点及容量、互联网交换中心
大数据·信息与通信
zandy10119 小时前
全链路可控+极致性能,衡石HENGSHI CLI重新定义企业级BI工具的AI协作能力
大数据·人工智能·ai analytics·ai native·agent-first
ShawnLiaoking9 小时前
pycharm 上传更新代码
ide·elasticsearch·pycharm
果粒蹬i10 小时前
Elasticsearch 单机部署实测:安装流程、常见坑点与远程访问配置
大数据·elasticsearch·搜索引擎
AC赳赳老秦10 小时前
OpenClaw数据库高效操作指南:MySQL/PostgreSQL批量处理与数据迁移实战
大数据·数据库·mysql·elasticsearch·postgresql·deepseek·openclaw
小王毕业啦11 小时前
2006-2023年 省级-建成区绿化覆盖率数据(xlsx)
大数据·人工智能·数据挖掘·数据分析·社科数据·实证分析·经管数据
AEIC学术交流中心12 小时前
【快速EI检索 | SPIE出版】第六届中国膜计算论坛暨2026年人工智能、大数据与电气自动化国际学术会议(CWMC&AIBDE 2026)
大数据·人工智能·量子计算
历程里程碑12 小时前
二叉树---二叉树的中序遍历
java·大数据·开发语言·elasticsearch·链表·搜索引擎·lua
AC赳赳老秦13 小时前
OpenClaw text-translate技能:多语言批量翻译,解决跨境工作沟通难题
大数据·运维·数据库·人工智能·python·deepseek·openclaw
ZC跨境爬虫13 小时前
dankoe视频笔记:如何培养对自己喜欢之事的痴迷感
人工智能·笔记·搜索引擎