andorid-studio nexus warehouse construction

1: Build the Nexus OSS platform Purpose:


    For Android-Studio, the development IDE can quickly acquire the builds in the dependency library in Maven (such as: common .jar files in Java), and provide an internal code sharing management platform for the enterprise.

Two: Reasons for building this platform:


    Because the download of public network resources is slow, it takes a long time. If the enterprise does not build this type of platform, the time cost and bandwidth will increase exponentially.

Three: Build the required documents and materials


    Maven download address: http://maven.apache.org/download.cgi

    nexus-oss download address: http://www.sonatype.org/nexus/archived/

    android-studio download address: https://developer.android .com/studio/index.html

    gralde configuration information Related information: https://docs.gradle.org/current/userguide/init_scripts.html

    The whole environment runs under ubuntu14.04. You can choose cpu, memory, and hard disk .If
    you choose to package on it, you can choose a server and build the environment.

Four: Build all the environmental information in the third above. Let Android and enterprise developers experience the thrill of rapid construction of android-studio.       


     Maven installation configuration data URL: http://maven.apache.org/install.html
     Installation needs to ensure that JDK1.7 or above is installed. If not, you can install it yourself. And configure java environment variables yourself.
     Our installation software directory is in /home/user home directory/soft/maven. So the downloaded tar.gz package is decompressed to this directory.
     Install and configure maven.

         unzip apache-maven-3.3.9-bin.zip or
         tar xzvf apache-maven-3.3. 9-bin.tar.gz
        vim /etc/profile/
        Add at the end of the file: MAVEN_HOME=/home/xxx/work/soft/maven/maven (Note: replace with your own installation directory)
        and add at the end of the file : export PATH=$PATH:$MAVEN_HOME/bin
        Check whether the installation is complete. export $MAVEN_HOME , source /etc/profile
        mvn -v
        xxx@xiuba:~/work/soft/maven$ mvn -v
        Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
        Maven home: /home/xiuba/work/soft/maven/maven
        Java version: 1.7.0_80, vendor: Oracle Corporation
        Java home: /home/xiuba/work/soft/java/jdk1.7.0_80/jre
        Default locale: en_US, platform encoding: UTF-8
        OS name: "linux", version: "4.2.0-38-generic", arch: "amd64", family: "unix"
        这样maven就安装ok了.

Five: nexus --oss installation configuration.


         Installation configuration reference materials: http://books.sonatype.com/nexus-book/reference/install.html

     download, download address http://www.sonatype.org/nexus/archived/
     create installation software directory: mkdir /home /xxx/soft/nexus/
     Copy the downloaded nexus to the current directory.

    sudo tar xvzf nexus-xxxxx-bundle.tar.gz

     to find the bin folder in the installation directory. Run ./nexus start.
     More detailed installation information
     Enter http://localhost:8081/nexus at: http://books.sonatype.com/nexus-book/3.0/reference/install.html and click login in the upper right corner, enter the user name admin, password: admin123 .
     If necessary For an in-depth understanding, you can read the book Maven Actual Combat.

Six: Next, let's talk about how to configure the nexus we built in android-Studio as a private server.


       1. Configure the website address. https://github.com/sonatype/nexus-book-examples

       1. Give the English reference document address as follows: https://docs.gradle.org/current/userguide/init_scripts.html

       2. According to the given English document, the configuration is as follows http://books.sonatype.com/nexus-book/reference/gradle.html

       3. Support-v4 package compilation configuration reference: http://stackoverflow.com/questions/18380337/android-support-library-setup-with-maven

       4. Add android annotation support related references: http://www.linuxidc.com/Linux/2015-08/121993.htm

Guess you like

Origin blog.csdn.net/shaohuazuo/article/details/51885039