【问题标题】:How to migrate maven plugins form maven to gradle如何将 maven 插件从 maven 迁移到 gradle
【发布时间】:2021-05-03 10:33:54
【问题描述】:

我正在将我的 Spring Boot 项目从 maven 迁移到 gradle。我已经完成了依赖项迁移,但是插件迁移存在问题。需要助手。此外,如果有任何比较 maven 和 gradle 插件的真实示例将不胜感激。我已经完成了 gradle init 之类的工作,所以我需要一些新的东西。这是我的代码:

      <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <linkXRef>false</linkXRef>
                    <rulesets>
                        <ruleset>/config/setting/setting.xml</ruleset>
                    </rulesets>
                </configuration>
            </plugin>

<plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.5</version>
            <configuration>
                <destFile>${sonar.jacoco.reportPath}</destFile>
                <append>true</append>
            </configuration>
            <executions>
                <execution>
                    <id>report-sonar</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>report-sonar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

我正在努力解决的 2 个插件。如果你能告诉我这两个的迁移,我想我会设法做其他的。

【问题讨论】:

    标签: java gradle jacoco-maven-plugin


    【解决方案1】:

    对于您的两个插件,也有一个 gradle 插件。

    文档看起来很有希望。

    https://docs.gradle.org/current/userguide/jacoco_plugin.html

    https://docs.gradle.org/current/userguide/pmd_plugin.html

    【讨论】:

      猜你喜欢
      • 2016-12-08
      • 1970-01-01
      • 2017-12-31
      • 1970-01-01
      • 2019-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-21
      相关资源
      最近更新 更多