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>
相关推荐
莽撞的大地瓜7 分钟前
洞察,始于一目了然——让舆情数据自己“说话”
大数据·网络·数据分析
证榜样呀14 分钟前
2026 中专大数据技术专业可考的证书有哪些,必看!
大数据·sql
星辰_mya14 分钟前
Elasticsearch主分片数写入后不能改
大数据·elasticsearch·搜索引擎
班德先生23 分钟前
深耕多赛道品牌全案策划,为科技与时尚注入商业表达力
大数据·人工智能·科技
鸿乃江边鸟40 分钟前
Spark Datafusion Comet 向量化Rust Native--CometShuffleExchangeExec怎么控制读写
大数据·rust·spark·native
忆~遂愿1 小时前
CANN metadef 深度解析:动态形状元数据管理、图编译器接口规范与序列化执行机制
大数据·linux
AI职业加油站1 小时前
职业提升之路:我的大数据分析师学习与备考分享
大数据·人工智能·经验分享·学习·职场和发展·数据分析
风指引着方向1 小时前
昇腾算子性能调优:ops-nn 中的内存布局与向量化技巧
java·大数据·人工智能
奥升新能源平台1 小时前
奥升充电|充电站用户分层分析与精细化运营策略研究
java·大数据·能源
班德先生1 小时前
以全案策划设计思维破局,让电器科技品牌力落地生根
大数据·人工智能·科技