pom文件详解

pom文件详解

父级常用POM

 
<modelVersion> 4.0.0 modelVersion> 

 
<groupId>xxxgroupId> 
 
<artifactId>xxxartifactId> 

 
<packaging> jar packaging> 

 
<version> 1.0-SNAPSHOT version> 
 
<repositories> 
    <repository>
        <id>alimavenid>
        <name>aliyun mavenname>
        <url>http://maven.aliyun.com/nexus/content/groups/public/url>
    repository>
repositories> 
 
<modules>
    
    <module>module>
modules> 
 

<properties>
    
    <java.version>1.8java.version>
    
    <maven.compiler.source>${java.version}maven.compiler.source>
properties> 





<profiles>
    <profile>
        <id>devid>
        <properties>
            <activeProfile>devactiveProfile>
        properties>
        <activation>
            <activeByDefault>trueactiveByDefault>
        activation>
    profile>
    <profile>
        <id>proid>
        <properties>
            <activeProfile>proactiveProfile>
        properties>
    profile>
    <profile>
        <id>testid>
        <properties>
            <activeProfile>testactiveProfile>
        properties>
    profile>
profiles>
 
<dependencyManagement> 
    <dependencies> 
        <dependency>
            <groupId>org.springframework.bootgroupId>
            <artifactId>spring-boot-starterartifactId>
            
            <version>${spring.boot.version}version>
        dependency>
    dependencies> 
dependencyManagement> 


<dependencies>  
    <dependency>  
        <groupId>org.springframework.bootgroupId>  
        <artifactId>spring-boot-starterartifactId>  
        
        [<version>${spring.boot.version}version>]
    dependency>  
dependencies> 
 
<build> 
     
    <plugins>
         
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-resources-pluginartifactId>
            <version>3.0.2version>
            <configuration>
                <encoding>UTF-8encoding>
            configuration>
        plugin>
         
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-compiler-pluginartifactId>
            <version>3.7.0version>
            <configuration>
                <source>${maven.compiler.source}source>
                <target>${maven.compiler.target}target>
                <encoding>utf-8encoding>
                <compilerArgument>-XDignore.symbol.filecompilerArgument>
            configuration>
        plugin>
        <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-surefire-pluginartifactId>
            <version>2.20version>
            <configuration>
                <skip>trueskip>
            configuration>
        plugin>
    plugins>
build>
<resources> 
     
    <resource> 
         
        <targetPath>targetPath> 

         
        <filtering>filtering>

         
        <directory>directory>

         
        <includes>
            <include>include>
        includes>

        
        <excludes>
            <exclude>exclude>
        excludes>
    resource> 
resources> 

你可能感兴趣的:(java)