springboot 引入maven配置

1.不需要安装maven,pom.xml引入maven依赖

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-maven-pluginartifactId>
            plugin>
        plugins>
    build>

2.在目录 用户/用户名/.m2目录下新增settings.xml文件,内容:(以阿里云maven仓库为例)






<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  

  

  

  
  <pluginGroups>
    
  pluginGroups>

  
  <proxies>
    
  proxies>

  
  <servers>
    

    
  servers>

  
  <mirrors>
    
     

    <mirror>
        <id>nexus-aliyunid>
        <mirrorOf>*mirrorOf>
        <name>Nexus aliyunname>
        <url>http://maven.aliyun.com/nexus/content/groups/publicurl>
    mirror> 
  mirrors>

  
  <profiles>
    <profile>
        <id>developmentid>
        <activation>
            <jdk>1.8jdk>
            <activeByDefault>trueactiveByDefault>
        activation>
        <properties>
            <maven.compiler.source>1.8maven.compiler.source>
            <maven.compiler.target>1.8maven.compiler.target>
            <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
            <maven.compiler.compilerVersion>1.8maven.compiler.compilerVersion>
        properties>
    profile>
    

    
  profiles>

  
settings>

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