Summaryuse Nexus to build Maven repository under LinuxOriginal: http://my.oschina.net/u/255289/blog/307143
1: Download maven and Nexus and unzip it.
wget http://apache.fayea.com/apache-mirror/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz
wget http://download.sonatype.com/nexus/oss/nexus-2.9.0-04-bundle.tar.gz
Tar xzf apache-maven-3.1.1-bin.tar.gz tar xzf nexus-2.9.0-04-bundle.tar.gz
2: Configure the environment variables, edit the/etc/profile file, add the following code.
maven_home=/usr/local/apache-maven-3.0.3
Export Maven_home
Export Path=${path}:${maven_home}/bin
3: Verify that the MAVEN installation configuration is successful, first load the configuration of the environment variable. Execute the MAVEN command to view the version information. If the view succeeds, then Maven's installation is successful, leaving only the Maven repository to build.
Source/etc/profile mvn-v
4: Start Nexus.
12 |
cd /usr/local/nexus-2
.9.0-04
/bin
.
/nexus start
|
If you are prompted with the following information, you can modify the Nexus content:
< Span style= "padding:0px; margin:0px; font-family:arial; font-size:14px; line-height:26px; " >****************************************
warning–not RECOMMENDED to RUN as ROOT
****************************************
if insist running as root, then set the environment variable run_as_user=root before running This script.
Vim Nexus
Find run_as_user= this line, modified to: Run_as_user=root, after starting again, review the log information.
tail-100f. /logs/wrapper.log
If the error is reported as: Unsupported Major.minor version 51.0 indicates that the JDK versions are too low, you need to use JDK1.7.
I am too lazy to install JDK1.7 again, so I downloaded the nexus-2.5.0 version again. Then repeat the above startup steps.
See at the end of the log: Started [email protected]:8081, stating that the success has been started.
Open Browser input: http://172.245.220.209:8081/nexus/. Default User name/password: admin/admin123
Go Build Maven Warehouse under CentOS