first, software preparation1, apache-maven-3.0-bin.Tar. Gz:http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-bin.tar.gz2, nexus-oss-webapp-1.8.0-bundle.Tar. Gz:http://nexus.sonatype.org/downloads/Second, MAVEN installation configuration1, create user groups that need to operate MAVEN, and Java code for users (if they are not created with root installation) #groupadd Configer//Create a user group#useradd-G Configer Configer//Create a user and specify a user group#passwdConfiger//Assigning a password to a user2, create an extract directory, and apache-maven-3.0-bin.Tarextract the. gz file to the specified directory Java code #cd/opt #mkdirMaven #Chown-R configer:configer/opt/Maven #chmod 755/opt/Maven #su-L Configer #Tar-ZVXF apache-maven-3.0-bin.Tar. GZ2, configuring the environment variable Java code #VI/home/configer/. Bash_profile add the following line to the file: Java code m2_home=/opt/maven/apache-maven-3.0Export M2_home PATH= $PATH: $M 2_home/Bin Export PATH3, view version of Java code #cd/opt/maven/apache-maven-3.0/bin #mvn--If version information is displayed, it should be created under the ${user} directory. M2 directory4, view. M2 Directory Java code #cd/home/configer/. m2 If you do not have a. M2 directory, you can manually add a #mkdir. M25, if you need to assign Maven's repository directory to a different directory, modify the configuration file Settings.xml file Java code in conf in the MAVEN installation directory #VI/opt/maven/apache-maven-3.0/conf/settings.xml The file in the<localRepository>....</localRepository>comments are opened or added to the file under this comment<localrepository>your Repository path</localrepository>Ii. Building a Nexus1, decompression nexus-oss-webapp-1.8.0-bundle.Tar. gz files to the specified directory Java code #Tar-ZVXF nexus-oss-webapp-1.8.0-bundle.Tar. GZ2, launch Nexus Java code #cd/opt/maven/nexus-oss-webapp-1.8.0/bin/JSW Choose the version of your machine: #cd linux-x86- +/ #./Nexus start reboot: #./Nexus Restart Stop: #./Nexus Stop3, run Nexus in Browser input: http://Localhost:8081/nexusYou can see the Nexus's home page, click Log in the upper right cornerinchthe default user name and password are: admin/admin123 will automatically generate a Nexus working directory after running Sonatype-Work,nexus downloaded jar packages will be stored in the Sonatype-work/nexus/in storage4, Configuration1Click on the left menu repositories the Java code Apache snapshots Codehaus snapshots Maven Central three repository on the right list respectively Nload Remote Index configuration to True, and save the settings, and then right-click on the list of three repository, click Reindex2Add a new repository, some of the more common jar packages may not be found in the nexus provided by the repository, generally more commonly used Java code JBoss two: http://repository.jboss.org/maven2/http//repository.jboss.org/nexus/content/repositories/releases/Sun's: http://download.java.net/maven/2/K-int: http://developer.k-int.com/maven2/For looking for Juel:juel .-impl:2.2.1this jar package, so I also added a look for myself: http://repository.exoplatform.org/content/groups/public/Add Step: Java code click Add->proxy repository->fill in the Repository ID, Repository Name, and other default of the remote Storage location. 3Add the new repository to the public repositories in the public repositories configuration, add all the items in the multiple-selection select to the left, and then save. 4add your own jar package Java code in the repository list there is a 3rd party, that is, third parties jar package, click will see a Artifact Upload tab, click, fill in the corresponding information. GAV Definition General Select GAV Parameters then add Group:Artifact:Version:Package example Juel:juel-impl:2.2.1: Jar and select the jar package to upload, save5In the nexus, set the proxy server option in the left Administrator menu, and in the lower middle of the page that opens on the right, there is a selection: Default HTTP Proxy Settings (optional) Selects the check box, Fill in the appropriate proxy server information. 6Write your own settings.xml with the following file contents: Java code<settings> <proxies> <proxy> <ID>normal</ID> <active>true</active> <protocol>http</protocol> <username>deployment</username> <password>deploy</password> 8081/nexus the</port> <nonproxyhosts>localhost:8081/nexus</nonproxyhosts> </proxy> </proxies> <mirrors> <mir Ror> <!--This was used to direct the public snapshots repoinchThe profile below-to- a different Nexus group-<ID>nexus-public-snapshots</ID> <mirrorOf>public-snapshots</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public-snapshots</url></mirror> <mirror> <!--this sends everythingElseTo/public-<ID>nexus</ID> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url></mirror> </mirrors> <profiles> <profile> <ID>development</ID> <repositories> <repository> <ID>central</ID> <url>http://central</url><releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginr Epositories> <pluginRepository> <ID>central</ID> <url>http://central</url><releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> <profile> <!--This profile would allow snapshots to be searched when activate D--> <ID>public-snapshots</ID> <repositories> <repository> <ID>public-snapshots</ID> <url>http://public-snapshots</url><releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginr Epositories>Font-size:1em; M