A. Win7 install the config maven
1. Download
Http://maven.apache.org/download.html
I downloaded is: apache-maven-3.2.5-bin.zip
2. Installation
Simply unzip the downloaded compressed package to the specified directory
My unpacked directory: D:\Program files\apache-maven-3.2.5
3. Configure environment variables: XML code m2_home = Add%m2_home%\bin in F:\apache-maven-3.2.1 path;
Note: Configuring in System variables
4. Set up local warehouse
Modify Setting.xml file XML code <settings> ... <localRepository> F:\repository </localRepository> ... &l T;/settings>
Note:
The D:\Program files\apache-maven-3.2.5\conf\setting.xml file is set to apply to the entire system
If the ${user.home}/.m2/settings.xml is set, it can only be applied to the current login user of the system
5. Test
Mvn-v or Mvn-version
Two. Ubuntu installation configuration Maven
1. Download
Http://maven.apache.org/download.html
I downloaded is: Apache-maven-3.2.5-bin.tar
2. Move to/opt directory to extract Java code $ sudo tar-zxvf apache-maven-3.2.5-bin.tar
3. Modify Directory name Java code $ sudo mv apache-maven-3.2.5 Maven3
4. Configure Environment variables
(1). Use VI command Java code $ sudo vi/etc/profile or $ sudo vi ~/.profile
(2). Use gedit Text editor java code $ sudo gedit/etc/profile or $ sudo gedit ~/.profile
Note:
Gedit the configuration file cannot be opened in the remote client (because it opens a text editor window), you have to open the configuration file by entering this command in the terminal terminal in the Ubuntu system.
In the open configuration file, add the following: XML code #set MAVEN environment M2_home=/opt/maven3 export maven_opts= "-xms512m-xmx512m" Export PAT H= $M 2_home/bin: $PATH
5. Update profile configuration file Java code $ sudo source ~/.profile or $ sudo source/etc/profile
6. Set up local warehouse
Modify Setting.xml file XML code <settings> <localRepository>/home/repository</localRepository> ... & Lt;/settings>
7. Test
Mvn-v or Mvn-version
--------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------
Installing Maven on Kali Linux
The install a JDK.
# sudo apt-get install OPENJDK-7-JDK
We need Maven to build ODL. Install the most recent version of Maven
# sudo mkdir-p/usr/local/apache-maven
Download the MAVEN source code
# wget http://ftp.wayne.edu/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
Now install Maven
# sudo mv apache-maven-3.3.3-bin.tar.gz/usr/local/apache-maven# sudo tar-xzvf/usr/local/apache-maven/ Apache-maven-3.3.3-bin.tar.gz-c/usr/local/apache-maven/# sudo update-alternatives--install/usr/bin/mvn mvn/usr/ LOCAL/APACHE-MAVEN/APACHE-MAVEN-3.3.3/BIN/MVN of sudo update-alternatives--config mvn# sudo apt-get install vim vim#. Bashrc
Add these to your ~/.BASHRC
Export M2_home=/usr/local/apache-maven/apache-maven-3.3.3export maven_opts= "-xms256m-xmx512m" # Very important to put The "M" On the Endexport java_home=/usr/lib/jvm/java-7-openjdk-amd64 # This matches sudo update-alternatives--config JAVA