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>
相关推荐
CONTONUE4 小时前
运行Spark程序-在Idea中(二)
大数据·spark·intellij-idea
计算机人哪有不疯的4 小时前
图文展示HDFS、YARN、MapReduce三者关系
大数据·spark
祈5334 小时前
MapReduce 的工作原理
大数据·mapreduce
Agatha方艺璇4 小时前
MapReduce报错 HADOOP_HOME and hadoop.home.dir are unset.
大数据·hadoop·mapreduce
@十八子德月生5 小时前
8天Python从入门到精通【itheima】-1~5
大数据·开发语言·python·学习
元6335 小时前
Hadoop集群的常用命令
大数据·hadoop
武汉格发Gofartlic7 小时前
FEKO许可证的安全与合规性
大数据·运维·安全
Kakaxiii8 小时前
【2025最新】gitee+pycharm完成项目的上传与管理
elasticsearch·pycharm·gitee
姬激薄8 小时前
HDFS概述
大数据·hadoop·hdfs
依年南台8 小时前
克隆虚拟机组成集群
大数据·hadoop