1  概念介绍

    一个项目所有的配置都放置在 POM 文件中:定义项目的类型、名字,管理依赖关系,定制插件的行为等等。比如说,你可以配置 compiler 插件让它使用 java1.5 来编译。

  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  2.    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">  
  3.    <modelVersion>4.0.0</modelVersion>   
  4.   
  5.    <groupId>com.mycompany.helloworld</groupId>   
  6.    <artifactId>helloworld</artifactId>   
  7.    <version>1.0-SNAPSHOT</version>   
  8.    <packaging>jar</packaging>   
  9.   
  10.    <name>helloworld</name>   
  11.    <url>http://maven.apache.org</url>   
  12.   
  13.    <properties>   
  14.      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>   
  15.    </properties>   
  16.   
  17.    <dependencies>  
  18.      <dependency>   
  19.        <groupId>junit</groupId>   
  20.        <artifactId>junit</artifactId>   
  21.        <version>3.8.1</version>   
  22.        <scope>test</scope>   
  23.      </dependency>   
  24.    </dependencies>   
  25.   </project>      

相关文章:

  • 2022-02-25
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-11-01
  • 2021-05-22
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2021-08-28
  • 2022-01-12
  • 2022-12-23
  • 2022-01-07
  • 2021-07-01
相关资源
相似解决方案