MAVEN中pom.xml文件配置中的各种标签含义

MAVEN中pom.xml文件配置中的各种标签含义

<?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>

    <groupId>cn.wolfcode</groupId>
    <artifactId>mavendemo1</artifactId>
    <version>1.0.0</version>
    <!--配置当前项目的打包压缩方式:jar或者war文件-->
    <!--当当前项目是javaweb项目时,需要打包成war文件-->
<packaging>war</packaging>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>
    <!--配置当前项目所需要的所有依赖-->
<dependencies>
    <!--配置指定依赖-->
    <dependency>
        <!--配置当前依赖所属企业-->
        <groupId>org.springframework</groupId>
        <!--配置当前依赖的名字-->
        <artifactId>spring-test</artifactId>
        <!--配置当前依赖版本号-->
        <version>5.0.8.RELEASE</version>
        <!--配置当前依赖起作用的时期-->
        <scope> test</scope>
    </dependency>
</dependencies>
</project>

<?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>

    <groupId>cn.wolfcode</groupId>
    <artifactId>mavendemo1</artifactId>
    <version>1.0.0</version>
    <!--配置当前项目的打包压缩方式:jar或者war文件-->
    <!--当当前项目是javaweb项目时,需要打包成war文件-->
<packaging>war</packaging>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>
    <!--配置当前项目所需要的所有依赖-->
<dependencies>
    <!--配置指定依赖-->
    <dependency>
        <!--配置当前依赖所属企业-->
        <groupId>org.springframework</groupId>
        <!--配置当前依赖的名字-->
        <artifactId>spring-test</artifactId>
        <!--配置当前依赖版本号-->
        <version>5.0.8.RELEASE</version>
        <!--配置当前依赖起作用的时期-->
        <scope> test</scope>
    </dependency>
</dependencies>

<!--在maven项目中部署插件-->
<build>
    <!--安装多个插件-->
    <plugins>
        <!--安装指定插件-->
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
             <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.1</version>
            <!--配置当前插件-->
            <configuration>
                <!--配置服务器端口号-->
                <port>8080</port>
                <!--配置获取资源的根路径-->
                <path>/</path>
                <!--配置资源编码集-->
                <uriEncoding>UTF-8</uriEncoding>
            </configuration>
        </plugin>
    </plugins>
</build>


</project>

  • 9
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值