note_pom.xml文件配置说明_note

43 篇文章 1 订阅

仅作为参考笔记,不推荐

<?xml version="1.0" encoding="UTF-8"?>
<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>
    <!--
    下面三个被称为gav
    用以生成坐标,在本地生成唯一标识
    <groupId>域名翻转.大项目名</groupId>
    <artifactId>子模块名</artifactId>
    <version>版本编号</version>
    -->
    <groupId>org.example</groupId>
    <artifactId>maven</artifactId>
    <version>1.0-SNAPSHOT</version>

    <!--name:名字,一般和模块名是一致的-->
    <name>maven</name>

    <!--依赖-->
    <!--
    在maven项目中,如果要使用一个当时存在的jar或模块,则可以通过依赖实现(去本地仓库,中央仓库去寻找)
    -->
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.0</version>
            <!--控制依赖的范围
            值有:compile、test、provided、runtime、system、import
            -->
            <scope>test</scope>
        </dependency>
    </dependencies>


    <!--
    该属性下用户自定义一个或多个maven属性,减少maven配置的重复更方便了maven项目的统一管理
    -->
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

    <!--排除依赖关系:-->
    <!--排除beans-->
    <exclusions>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.3.13.RELEASE</version>
        </exclusion>
    </exclusions>
</project>

关于

控制依赖的范围
值有:compile、test、provided、runtime、system、import,可以看这位老哥的文章

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

无名之辈无名之辈

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

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

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

打赏作者

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

抵扣说明:

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

余额充值