框架maven

本文详细解析了Maven项目中的pom.xml文件配置,包括模型版本、群组ID、项目ID、版本号、打包类型、项目名称、URL、源码编码及依赖管理等关键信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

maven pom.xml 的配置及解释

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
<!-- 模型版本号 -->
<!-- 群组id ,单位域名反写 -->
  <groupId>cn.itcast</groupId>
  <!-- 项目  id  一个单位只有一个域名,但是一个单位可以有多个项目 -->
  <artifactId>One</artifactId>
 <!--版本号:用于描述 开发过程的阶段性标识 -->
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging><!--生成什么类型的,有jar, war(默认)  -->

  <name>One</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
<!--依赖管理  -->
  <dependencies>
  <!--  具体依赖-->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
======================`
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.9</version>
      <scope>test</scope>
    </dependency>
    ====== <dependency>
      <groupId>cn.itcast</groupId>
  <artifactId>One</artifactId>
  <version>0.0.1-SNAPSHOT</version>
      
    </dependency>========
  </dependencies>`

在一个maven项目里需要用的另一个maven项目里的东西需要在pom中配置的东西

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

特立独行的蜗牛

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值