1. 程式人生 > >Spring日記_01 之 Maven搭建

Spring日記_01 之 Maven搭建

com groups name content instance sch 配置 mir ren

# 項目環境搭建

## 1. Eclipse + Maven

中央庫太慢所以使用 阿裏雲鏡像:maven.aliyun.com

1. 配置Aliyun Maven 倉庫

導入配置文件 settings.xml

Window – Preferences – Maven – User Settings - Global Settings 選擇settings.xml

技術分享

附:settings.xml

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

	<localRepository>F:/maven</localRepository>

	<pluginGroups>
	</pluginGroups>

	<proxies>
	</proxies>

	<servers>
	</servers>

	<mirrors>
		<mirror>
			<id>nexus</id>
			<name>Tedu Maven</name>
			<mirrorOf>*</mirrorOf>
			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
			<!-- <url>http://maven.aliyun.com/content/groups/public</url> -->
		</mirror>
	</mirrors>
	<profiles>

	</profiles>
	<activeProfiles>
	</activeProfiles>

</settings>

 

完成之後 F:/maven 路徑下會生成maven庫

技術分享

2. 創建項目測試Maven

Spring日記_01 之 Maven搭建