• localRepository节点中配置本地仓库路径
    <localRepository>E:/mavenrepo</localRepository>
  • 在mirrors节点中设置阿里云镜像仓库为默认中央仓库
    <mirrors>
     <mirror>
         <id>alimaven</id>
         <mirrorOf>central</mirrorOf>
         <name>aliyun maven</name>
         <url>http://maven.aliyun.com/nexus/content/groups/public</url>
     </mirror>
    </mirrors>
  • 在profiles节点中指定jdk的版本
    <profiles>
      <profile>
        <id>jdk-1.8</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>
    </profiles>
Last modification:February 24th, 2020 at 09:48 pm