maven在eclipse中配置过程并导入maven工程,以及关于工程中jdk和git的设置,

一,maven在eclipse中配置:

1.window-preferences-maven-installations选择自己安装的maven,
2.window-preferences-maven-user Settings-选择在maven安装包config下的setting配置文件(注意是自己已经配置好的maven)。

发布使用:

1,在父工程中右键选择maven-Updata project,右键选择run as Maven clean 再选择maven install,更新代码。

2,在子工程中选择运行代码,讲需要部署的代码运行就行了。


二、将maven工程导入:

1选择project explorer (可以显示class等文件)


2.将工程分级显示:


3,引进maven工程



4.使用阿里云和中央库配置内容: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>D:/feianzhuang/repository</localRepository>
 
  <pluginGroups>
  </pluginGroups>

  <proxies>
  </proxies>

  <servers>   
  </servers>
  
  <mirrors>  


<mirror>


    <id>nexus-aliyun</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo1.maven.org/maven2/</url>
</mirror>
 
<mirror>
  <id>repo2</id>
  <mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
  <url>http://repo2.maven.org/maven2/</url>
</mirror>
 
  </mirrors>

    <profiles>
  </profiles>

</settings>


5.对于从git上拉代码后出现架构不一样的情况处理。

一,选中工程右键后,Run As --> Maven  intall 。(有时候下载库的时间比较慢,可以将下载好的库添加的本地路径下面如:D:\feianzhuang\repository)

二,下载完成后,对于项目结构不一致的,采用:选中工程右键后,Maven --> Update  Project 即可。


二。关于工程中jdk的设置,在对逐个工程中选择自己安装的对应JDK的方法。

1。java  Build  Path --->>>Libraries  -->>>>>>Add  library  -->>>Alternate(选择自己安装的JDK版本即可)。

2。在order  and  Export 中将maven  dependencies  和Jar  System  library(jdk)选中。

注意:同时maven中settings中配置文件,要根据实际情况使用本地库。

在设定maven中settings时,不管用什么编辑器,在保存的时候一定要保存为   “UTF-8”,推荐使用   notePad++  。(即使转换成UTF-8)


三。Git设置

1.在window--->show view--->other输入git选择Git  Repositories

2.选择第二个小图标,名字为:Clone   a  Git Repository  and  add  the  clone to  this  view 

3.选择Clone  URI  .在弹出界面输入代码库的url和密码即可。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kunzai6

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值