maven中的conf文件夹下的settings.xml文件配置

一、配置本地仓库

<!--设置本地仓库路径-->
<localRepository>D:\java\maven\localRepository</localRepository>

二、配置阿里云私服(或换成自己公司搭建的私服)

<!-- 在mirrors标签添加mirror标签,并指定阿里云私服下载依赖会快点 -->
<mirror>
  <id>alimaven</id>
  <name>aliyun maven</name>
  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  <mirrorOf>central</mirrorOf>
</mirror>

三、配置maven认jdk版本

<!-- 在已有的profiles标签添加profile标签,限定maven项目认的jdk版本 -->
<profile>    
    <id>myjdk</id>    
    <activation>    
        <activeByDefault>true</activeByDefault>    
        <jdk>1.8</jdk>    
    </activation>    
    <properties>    
        <maven.compiler.source>1.8</maven.compiler.source>    
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> 
    </properties>    
</profile>

<!-- 让增加的 profile生效 -->
<activeProfiles>
  <activeProfile>myjdk</activeProfile>
</activeProfiles>

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念