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>
相关推荐
问商十三载3 小时前
AI引擎生成式优化实践:刑事辩护律师团队IP构建
大数据·人工智能
会议咨询4 小时前
2026年大数据、信息系统与智能通信国际会议(BDIIC 2026)
大数据·信息系统·智能通信
Raas1004 小时前
MAI Gateway(魔芋企业级AI网关)能力解析:AI网关能做故障转移吗?AI网关核心功能详解
大数据·人工智能·网关·ai·gateway·mai gateway
IT研究所5 小时前
AI-ITR平台如何减少客户问题反复升级?
大数据·运维·人工智能·低代码·自然语言处理·安全架构·企微
回眸&啤酒鸭6 小时前
【回眸】OpenSwarm 多智能体协作系统实战指南
大数据·前端·人工智能
大大大大晴天6 小时前
每天认识一个组件:Apache DolphinScheduler
大数据
yumgpkpm6 小时前
Acceldata ODP(Open Data Platform)3.3.6.4(RHEL9)保姆级完整安装手册
大数据·人工智能·hive·hadoop·kafka·hbase·cloudera
邓工说电7 小时前
智慧断路器安全吗?数据加密、离线保护与合规认证全解读
大数据·数据库·人工智能·智能断路器·炜晔科技
出海客7 小时前
跨境电商多语言客服知识库怎么建:资料结构、检索边界与人工升级
大数据·人工智能
liliangcsdn7 小时前
派息率指标的应用探索和分析
大数据·算法