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>
相关推荐
一切皆是因缘际会16 分钟前
AI 从 “模仿智能” 到 “重构世界” 的范式跃迁
大数据·人工智能·深度学习·重构·架构
专注API从业者17 分钟前
用 Open Claw + 淘宝商品接口,快速实现电商商品监控与智能选品(附完整代码)
大数据·前端·数据结构·数据库
Are_You_Okkk_17 分钟前
无需配环境、不受设备限!MonkeyCode重新定义研发
大数据·人工智能·开源·团队开发·ai编程
kyraaa118 分钟前
618智能灭蚊器什么牌子好?电灭蚊灯哪个牌子好用?综合测评希亦、绳池等10大热门灭蚊灯品牌!
大数据·人工智能·python
IT飞牛24 分钟前
Elasticsearch 技术调研与实践
大数据·elasticsearch·搜索引擎
AI_yangxi26 分钟前
短视频矩阵系统行业领先的厂家
大数据·人工智能·矩阵
TDengine (老段)27 分钟前
TDengine 虚拟表实现原理
大数据·数据库·物联网·时序数据库·iot·tdengine·涛思数据
狒狒热知识33 分钟前
媒体发稿软文营销行业价值升级从简单发稿到品牌全案传播服务进化
大数据·人工智能
从此以后自律38 分钟前
Git一篇
大数据·elasticsearch·搜索引擎
超人也会哭️呀38 分钟前
ES 混合检索(文本+向量)中的条件处理陷阱——当权限过滤遇到关键词查询
android·大数据·elasticsearch