Maven - 配置setting.xml

1、配置本地库路径

<localRepository>C:/fyliu/mvn/repolocalRepository>

2、配置中央仓库

    <mirror>
      <id>alimavenid>
      <mirrorOf>centralmirrorOf>
      <name>Human Readable Name for this Mirror.name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/url>
    mirror>
    <mirror>
        <id>nexusid>
        <name>internal nexus repositoryname>
        <url>http://repo.maven.apache.org/maven2url>
        <mirrorOf>centralmirrorOf>
    mirror>
    <mirror>
        <id>CNid>
        <name>OSChina Centralname>
        <url>http://maven.oschina.net/content/groups/public/url>
        <mirrorOf>centralmirrorOf>
    mirror>
    <mirror>
        <id>ukid>
        <mirrorOf>centralmirrorOf>
        <name>Human Readable Name for this Mirror.name>
        <url>http://uk.maven.org/maven2/url>
    mirror>

3、指定jdk版本

   <profile>
      <id>jdk-1.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>

 

转载于:https://www.cnblogs.com/ZeroMZ/p/11561106.html

你可能感兴趣的:(Maven - 配置setting.xml)