maven仓库配置(阿里云)

在maven文件夹下的setting.xml文件夹下查找<mirrors>标签,将下列代码添加进去

   <mirror>
	    <!--This sends everything else to /public -->
	    <id>aliyun maven</id>
	    <mirrorOf>central</mirrorOf>
	    <name>aliyun maven</name>
	    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

 并且在<profiles>标签下添加如下代码控制maven对应的jdk版本,代码如下:

<profile>    
        <id>jdk-1.7</id>    
        <activation>    
            <activeByDefault>true</activeByDefault>    
            <jdk>1.7</jdk>    
        </activation>    
        <properties>    
            <maven.compiler.source>1.7</maven.compiler.source>    
            <maven.compiler.target>1.7</maven.compiler.target>    
            <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>    
        </properties>    
</profile>

  

posted @ 2017-05-30 23:18  萌面大侠客  阅读(8222)  评论(0)    收藏  举报