maven常用依赖
时间: 2023-09-18 22:13:53 浏览: 204
Maven 是一个 Java 项目的构建工具,常用依赖可以在 Maven 中通过添加相关的依赖项来实现。以下是一些常用的 Maven 依赖:
1. JUnit:JUnit 是一个 Java 单元测试框架。在 Maven 中,可以使用以下依赖项添加 JUnit:
```
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
```
2. Spring Framework:Spring Framework 是一个 Java 应用程序开发框架。在 Maven 中,可以使用以下依赖项添加 Spring Framework:
```
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.2.5.RELEASE</version>
</dependency>
```
3. Log4j:Log4j 是一个 Java 日志记录框架。在 Maven 中,可以使用以下依赖项添加 Log4j:
```
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.13.2</version>
</dependency>
```
4. Apache Commons Lang:Apache Commons Lang 是一个 Java 实用工具库。在 Maven 中,可以使用以下依赖项添加 Apache Commons Lang:
```
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
```
这里列出的是一些常用的 Maven 依赖,当然还有很多其他的依赖可以根据具体的需求进行添加。
阅读全文
相关推荐













