zoukankan      html  css  js  c++  java
  • eclipse Git & maven 安装

    1. JDK安装请自行百度。
    2. Maven是免安装的。压缩包解压完成后。如解压后放在D:Servermaven下。接下来配置maven的环境变量:

     系统变量:MAVEN_HOME = D:Servermaven

     用户变量:path = %MAVEN_HOME%in

    配置完成后,打开cmd,在里面敲 mvn -version

    即为安装成功。

    3.将eclipse的安装包解压后放在具体位置。然后在eclipse的根目录创建一个workspace的目录。

    启动eclipse时选择该目录作为workspace

    1. 该eclispe已经自带maven&Git插件,为了使得Eclipse中安装的Maven插件,同windows中安装的那个相同,需要让eclipse中的maven重新定位一下,点击Window -> Preference -> Maven -> Installation -> Add进行设置

    修改maven仓库存放位置,打开我本地的D:jekensapache-maven-3.3.9-binapache-maven-3.3.9confsettings.xml添加具体路径

    <localRepository>D:jekensapache-maven-3.3.9-binapache-maven-3.3.9 epositories</localRepository>

    点击Window -> Preference -> Maven ->User Settings选择刚修改的settings.xml文件

    使用maven下载jar包

    我暂且不谈Maven的长篇概念(其实我也还很多很多不懂),我先给大家介绍一个简单的查找方法,让你很快地找到所需的Dependency,并配置到你的pom.xml里面去。 
    最快捷方法: 
    GOOGLE搜索:maven 你需的jar包名称 repository 
    比如我要做EJB,我要找jboss-j2ee.jar的Dependency 

    就在GOOGLE里输入 
    maven jboss-j2ee repository 
    在结果的第一条,进去你就可以在页面里找到下面这段 
    <dependency> 
        <groupId>jboss</groupId> 
        <artifactId>jboss-j2ee</artifactId> 
        <version>4.0.2</version> 
    </dependency> 

    如果是第一次添加记得在外围加一层< dependencies >如下:

    <dependencies>

    <dependency>

        <groupId>org.mongodb</groupId>

        <artifactId>mongo-java-driver</artifactId>

        <version>3.2.2</version>

    </dependency>

     </dependencies>

  • 相关阅读:
    周末之个人杂想(十三)
    PowerTip of the DaySorting Multiple Properties
    PowerTip of the DayCreate Remoting Solutions
    PowerTip of the DayAdd Help to Your Functions
    PowerTip of the DayAcessing Function Parameters by Type
    PowerTip of the DayReplace Text in Files
    PowerTip of the DayAdding Extra Information
    PowerTip of the DayPrinting Results
    Win7下IIS 7.5配置SSAS(2008)远程访问
    PowerTip of the DayOpening Current Folder in Explorer
  • 原文地址:https://www.cnblogs.com/luo-mao/p/5872392.html
Copyright © 2011-2022 走看看