【Maven】pom常用配置标签详解

  
<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.0modelVersion>   
  
      
    <groupId>com.examplegroupId>   
    <artifactId>my-appartifactId>   
    <version>1.0-SNAPSHOTversion>   
    <packaging>jarpackaging>
    <url>http://www.example.com/my-projecturl>   
      
    <dependencies>  
          
        <dependency>  
            <groupId>junitgroupId>   
            <artifactId>junitartifactId>   
            <version>4.13.2version>   
            <scope>testscope>   
            
        dependency>  
        <dependency>  
          <groupId>org.springframework.bootgroupId>  
          <artifactId>spring-boot-starter-webartifactId>  
          
        dependency> 
    dependencies>  
  
      
    <build>  
    	
        <plugins>  
              
            <plugin>  
                <groupId>org.apache.maven.pluginsgroupId>   
                <artifactId>maven-compiler-pluginartifactId>   
                <version>3.8.1version>   
                <configuration>  
                    <source>1.8source>   
                    <target>1.8target>   
                configuration>  
            plugin>  
        plugins>  
    build>  
  
      
    <properties>  
        <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>   
        <maven.compiler.source>1.8maven.compiler.source>   
        <maven.compiler.target>1.8maven.compiler.target>   
        <springboot.web.version>2.5.5springboot.web.version>   
    properties>  
  
      
    <parent>  
          
        <relativePath> 
    parent>  
    <modules>  
          
        <module>module1module> 
    modules>  
  
      
    <distributionManagement>  
          
        <repository>
            <id>OSS_Releaseid> 
            <name>oss release repositoryname> 
            <url>url>
        repository>
        <snapshotRepository>
            <id>OSS_Snapshotid>
            <name>oss snapshot repositoryname>
            <url>url>
        snapshotRepository>
    distributionManagement>  


  
      
    <reporting>  
        <plugins>  
              
        plugins>  
    reporting>  
  
      
    <profiles>  
          
        
    profiles>  
  
      
    <dependencyManagement>  
        <dependencies>  
              
          <dependency>  
            <groupId>org.springframework.bootgroupId>  
            <artifactId>spring-boot-starter-webartifactId>  
              
            <version>${springboot.web.version}version>  
          dependency> 
        dependencies>  
    dependencyManagement>  
  
project>




你可能感兴趣的:(maven,java)