正文
在pom.xml文件中自定义JDK版本+阿里maven镜像修改
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
在学习和开发中 总是修改jdk版本 但是这些配置文件又不想记 在此记录一下 方便查询:
<build>
<plugins>
<!-- 指定jdk -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
特此记录 但是会出现 项目上有错误 更新maven的快照版本即可
在学习和开发中使用maven开发 国外的中央仓库 的速度非常慢 有时候就下载jar停止了 换成阿里maven更好一点 为了方便配置 记录一下 配置文件 方便以后找
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>