在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ Linux/ Maven 安裝和配置
Linux 下常用壓縮文件的解壓、壓縮
  • 1.
Maven 安裝和配置
  • 1.
CentOS 網(wǎng)絡(luò)設(shè)置
  • 1.
  • 1.
  • 1.
TeamCity 安裝和配置
Zsh 入門
  • 1.
  • 1.
Bash 其他常用命令
Bash 常用命令
  • 1.
  • 1.
  • 1.
Ubuntu 介紹
Ubuntu 網(wǎng)絡(luò)相關(guān)設(shè)置問題
Nginx 安裝和配置
  • 1.
  • 1.
  • 1.
  • 1.
Linux-Tutorial
Nexus 安裝和配置
  • 1.
黑客入侵檢查
Yum 下載安裝包及對(duì)應(yīng)依賴包
  • 1.
  • 1.
Tomcat 8 安裝和配置、優(yōu)化
  • 1.
Ubuntu 安裝和分區(qū)

Maven 安裝和配置

Maven 安裝

  • Maven 安裝

    • 官網(wǎng):http://maven.apache.org/
    • 官網(wǎng)下載:http://maven.apache.org/download.cgi
    • 歷史版本下載:https://archive.apache.org/dist/maven/binaries/
    • 此時(shí)(20160208) Maven 最新版本為:3.3.9
    • Maven 3.3 的 JDK 最低要求是 JDK 7
    • 我個(gè)人習(xí)慣 /opt 目錄下創(chuàng)建一個(gè)目錄 setups 用來存放各種軟件安裝包;在 /usr 目錄下創(chuàng)建一個(gè) program 用來存放各種解壓后的軟件包,下面的講解也都是基于此習(xí)慣
    • 我個(gè)人已經(jīng)使用了第三方源:EPEL、RepoForge,如果你出現(xiàn) yum install XXXXX 安裝不成功的話,很有可能就是你沒有相關(guān)源,請(qǐng)查看我對(duì)源設(shè)置的文章
    • 下載壓縮包:wget http://mirrors.cnnic.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
    • 解壓:tar zxvf apache-maven-3.3.9-bin.tar.gz
    • 修改目錄名,默認(rèn)的太長(zhǎng)了:mv apache-maven-3.3.9/ maven3.3.9/
    • 移到我個(gè)人習(xí)慣的安裝目錄下:mv maven3.3.9/ /usr/program
    • 環(huán)境變量設(shè)置:vim /etc/profile
    • 在文件最尾巴添加下面內(nèi)容:

      # Maven
      MAVEN_HOME=/usr/program/maven3.3.9
      PATH=$PATH:$MAVEN_HOME/bin
      MAVEN_OPTS="-Xms256m -Xmx356m"
      export MAVEN_HOME
      export PATH
      export MAVEN_OPTS
    • 刷新配置文件:source /etc/profile
    • 測(cè)試是否安裝成功:mvn -version

Maven 配置

  • 配置項(xiàng)目連接上私服
  • 全局方式配置:
<?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:/maven/my_local_repository</localRepository>

    <pluginGroups>
    </pluginGroups>

    <proxies>
    </proxies>

    <!--設(shè)置 Nexus 認(rèn)證信息-->
    <servers>
        <server>
            <id>nexus-releases</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
        <server>
            <id>nexus-snapshots</id>
            <username>admin</username>
            <password>admin123</password>
        </server>
    </servers>

    <!--設(shè)置 Nexus 鏡像,后面只要本地沒對(duì)應(yīng)的以來,則到 Nexus 去找-->
    <mirrors>
        <mirror>
            <id>nexus-releases</id>
            <mirrorOf>*</mirrorOf>
            <url>http://localhost:8081/nexus/content/groups/public</url>
        </mirror>
        <mirror>
            <id>nexus-snapshots</id>
            <mirrorOf>*</mirrorOf>
            <url>http://localhost:8081/nexus/content/groups/public-snapshots</url>
        </mirror>
    </mirrors>

    <profiles>
        <profile>
            <id>nexus</id>
            <repositories>
                <repository>
                    <id>nexus-releases</id>
                    <url>http://nexus-releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>nexus-snapshots</id>
                    <url>http://nexus-snapshots</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>nexus-releases</id>
                    <url>http://nexus-releases</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <id>nexus-snapshots</id>
                    <url>http://nexus-snapshots</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>

    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>

</settings>
  • 項(xiàng)目級(jí)別:

資料