一点一点学maven(06)——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.0modelVersion>

  
  
  <groupId>com.jsun.demogroupId>
  
  <artifactId>demo-maven01artifactId>
  
  
  <version>0.0.1-SNAPSHOTversion>
  
  <packaging>jarpackaging>

  
  <parent>
    <groupId>org.springframework.bootgroupId>
    <artifactId>spring-boot-starter-parentartifactId>
    <version>1.2.5.RELEASEversion>
  parent>

  
  <modules>
    <module>module>
  modules>

  
  <name>Maven01name>
  <url>http://maven.apache.orgurl>
  <description>测试maven项目description>

  
  <developers>
    
    <developer>
        
        <id>001id>
        
        <name>jsunname>
        
        <email> [email protected] email>
        
        <url />

        
        <roles>
            <role>developerrole>
        roles>

        
        <organization>com-jsunorganization>
        
        <organizationUrl> http://demo.jsun.com/jsunorganizationUrl>   
    developer>
  developers>


  
  <licenses>
    <license>
        <name>name>
        
        <url>url>
        
        <distribution>distribution>
        
        <comments>comments>
    license>
  licenses>

  
  <organization>
      <name>name>
      <url>url>
  organization>


  
  <properties>
    <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
    <junit.version>3.8.1junit.version>
  properties>

  
  <dependencies>
    
    <dependency>
      <groupId>org.springframeworkgroupId>
      <artifactId>spring-coreartifactId>
      <version>1.2.6version>

      
      <type>jartype>


      
      
      
      
      <scope>testscope>


      
      <exclusions>
        <exclusion>exclusion>
      exclusions>
    dependency>

        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-configuration-processorartifactId>
            
            <optional>trueoptional>
        dependency>

    <dependency>
        <groupId>net.sf.json-libgroupId>
        <artifactId>json-libartifactId>
        
        <classifier>jdk15classifier>
        <version>2.4version>
    dependency>
  dependencies>

  
  <dependencyManagement>
    <dependencies>
        <dependency>
          <groupId>junitgroupId>
          <artifactId>junitartifactId>
          <version>${junit.version}version>      
        dependency>
    dependencies>
  dependencyManagement>

  
  <build>
    
    <finalName>myProjectfinalName>  

    
    <plugins>
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-source-pluginartifactId>
            <version>2.4version>
            <executions>
                <execution>
                    <phase>packagephase>
                    <goals>
                        <goal>jar-no-forkgoal>
                    goals>
                execution>
            executions>
        plugin>
    plugins>

    
    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-pluginartifactId>
                
                
                <configuration>
                    
                    <source>1.7source>
                    
                    <target>1.7target>
                    
                    <encoding>${project.build.sourceEncoding}encoding>
                configuration>
            plugin>

        plugins>
    pluginManagement>
  build>
project>

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