maven eclipse(1)搭建

1、准备工作。

下载最新eclipse版本(楼主目前版本4.5.2)。

下载地址:eclipse 下载

选择java开发版本:

选择下载源头:

2、设置eclipse maven

这里使用eclispe自带maven。

3、设置setting.xml、代理、本地仓库地址

其中setting.xml如下:

<settings xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                               http://maven.apache.org/xsd/settings-1.0.0.xsd">
   <!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ~/.m2/repository
   -->
   <!-- 本地仓库地址 -->
  <localRepository>E:/JOB/VanclSearch/repository</localRepository>
  <!-- 代理服务器  -->
  <proxies>
    <proxy>
      <id>myproxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>127.0.0.1</host>
      <port>1080</port>
      <username></username>
      <password></password>
    </proxy>
  </proxies>
  <!-- 编译版本,jdk版本可以随意调整 -->
  <profile>  
    <id>jdk-1.7</id>  
     <activation>  
          <activeByDefault>true</activeByDefault>  
          <jdk>1.7</jdk>  
      </activation>  
	<properties>  
		<maven.compiler.source>1.7</maven.compiler.source>  
		<maven.compiler.target>1.7</maven.compiler.target>  
		<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>  
	</properties>  
	</profile> 
</settings>
4、设置eclipse代理,这里的代理和maven setting.xml的proxy代理一致。


设置这个代理的原因,创建maven项目的时候需要选择


回去对应仓库下载jar包,如果没有设置代理会报错,这里一劳永逸。


好了,整个maven搭建就结束了,下面就是开发了。相对于eclipse 3.7的版本搭建要容易很多。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值