Maven modify the configuration of settings.xml

Configure local warehouse

<localRepository>本地仓库的路径</localRepository>

Configure the JDK version
and add it to the node (the example is the version that adds JDK1.9)

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

Configure the remote warehouse as a domestic node
and add it to the node (for example, Alibaba Cloud remote warehouse)

<mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
<mirror>
      <id>repo2</id>
      <mirrorOf>central</mirrorOf>
      <name>repo2 maven</name>
      <url>http://repo2.maven.org/maven2</url>
</mirror>

Guess you like

Origin blog.csdn.net/weixin_45355510/article/details/112102590