跳到正文
cccskills
免费在 GitHub 公开

Maven standards

Conventions to use in Maven files, mostly the `pom.xml` files

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md2.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

1. Make sure dependencies that are supposed to be of scope test, remain test dependencies

In most cases, test dependencies should be of scope test. If you find any dependencies that are supposed to be of scope test but are not, you should add the <scope>test</scope> element to them. This ensures that the dependencies are only included in the test classpath and not in the production classpath. For these cases, the following are the dependencies that supposed to be of scope test:

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk-jvm</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ninja-squad</groupId>
            <artifactId>springmockk</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-assertions-core-jvm</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

In some cases, the test dependencies may be used for production code in test modules. Those cases are not always easy to determine. However, if you see that the module, where these dependencies are found to be used, is being used as a test dependency of other modules in the same project, then leave the dependency as is.

2. Excessive declarations of the maven compiler

As a common practice, the maven-compiler-plugin was declared in the parent module, but also in many submodules. The repetition is unnecessary, but may still prevail. Please remove all maven-compiler-plugin declarations from all modules and submodules. Keep only one at the top level. All the other maven-compiler-plugin declarations can be removed

3. Excessive declarations of maven surefire and maven failsafe

As a common practice, the maven-surefire-plugin and the maven-failsafe-plugin were declared in the parent module, but also in many submodules. Please remove all maven-surefire-plugin and the maven-failsafe-plugin declarations from all modules and submodules. Keep them only at the top level. All the other maven-surefire-plugin and the maven-failsafe-plugin declarations can be removed

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Conventions for using annotations in all tests using Jupiter

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

docker

免费

Conventions for docker

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

Conventions for using in all JEE frameworks. These are common standards for CDI

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

Conventions for using in all JVM languages

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

Conventions for using Java

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

Conventions for using Kotlin

中文简介正在准备中。当前显示原文说明。

jesperancinha/kotlin-mysteries22026年7月20日 更新

查看 jesperancinha 的全部技能

报告此技能的问题