maven环境搭建

maven历史版本下载:https://archive.apache.org/dist/maven/

  • 新建系统变量
  • 编辑Path,添加bin目录
  • mvn -v测试查看版本号
  • conf目录下新建repository文件夹,作为本地仓库

settings.xml


<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">
  
  
   <localRepository>D:\apache-maven-3.6.1\conf\repositorylocalRepository>
  
  <pluginGroups>
    
  pluginGroups>

  <proxies>
	<profile>    
	    <id>jdk1.8id>    
	    <activation>    
	        <activeByDefault>trueactiveByDefault>
	        <jdk>1.8jdk>    
	    activation>
	    <properties>    
	        <maven.compiler.source>1.8maven.compiler.source>    
	        <maven.compiler.target>1.8maven.compiler.target>
	        <maven.compiler.compilerVersion>1.8maven.compiler.compilerVersion> 
	    properties>    
	profile>
  proxies>

  <servers>
    
  servers>

  <mirrors>
    
	<mirror>
	    <id>alimavenid>
	    <mirrorOf>centralmirrorOf>
	    <name>aliyun mavenname>
	    <url>http://maven.aliyun.com/nexus/content/repositories/central/url>
	mirror>
	<mirror>
	    <id>alimavenid>
	    <name>aliyun mavenname>
	    <url>http://maven.aliyun.com/nexus/content/groups/public/url>
	    <mirrorOf>centralmirrorOf>
	mirror>
	
	<mirror>
	    <id>centralid>
	    <name>Maven Repository Switchboardname>
	    <url>http://repo1.maven.org/maven2/url>
	    <mirrorOf>centralmirrorOf>
	mirror>
	<mirror>
	    <id>repo2id>
	    <mirrorOf>centralmirrorOf>
	    <name>Human Readable Name for this Mirror.name>
	    <url>http://repo2.maven.org/maven2/url>
	mirror>
	
	<mirror>
	    <id>maven.net.cnid>
	    <name>oneof the central mirrors in chinaname>
	    <url>http://maven.net.cn/content/groups/public/url>
	    <mirrorOf>centralmirrorOf>
	mirror>
	
	<mirror>
	    <id>ibiblioid>
	    <mirrorOf>centralmirrorOf>
	    <name>Human Readable Name for this Mirror.name>
	    <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/url>
	mirror>
	
	<mirror>
	    <id>jboss-public-repository-groupid>
	    <mirrorOf>centralmirrorOf>
	    <name>JBoss Public Repository Groupname>
	    <url>http://repository.jboss.org/nexus/content/groups/publicurl>
	mirror>
	
	<mirror>
	    <id>google-maven-centralid>
	    <name>Google Maven Centralname>
	    <url>https://maven-central.storage.googleapis.com
	    url>
	    <mirrorOf>centralmirrorOf>
	mirror>

  mirrors>
  <profiles>
    
  profiles>
settings>

你可能感兴趣的:(maven)