Local use nexus3.18.1 repository manager to build and use maven PW

PW maven build nexus3.18.1
1, the installation nexus
2, installation PW
3, Ali cloud mirroring configuration
1, the installation nexus
1.1 into the nexus extracted directory, open cmd, registered nexus Service

    nexus.exe / install nexus
1
1.2 start nexus Service

nexus.exe / Start Nexus
1
now, you can access localhost: 8081, the login management page.
1.3 Logging
version of nexus before, the default login account is: admin, password: admin123
But when I log in, they found the password wrong

A closer look suggests that tell you admin account password in sonatype-work \ nexus3 below the admin.password file, follow the prompts to open the file path to see a long list of passwords, so you can log in.
Look, after the original interface and login are not the same, the initial generation of warehouses and nexus2 not the same


It seems nexus3 after taking into account the security, change the password randomly generated, and it will guide you login successfully modified admin account password, security full screen there are wood. . .

2, PW installation
before installing PW, but read a lot of documents, in the final analysis is mainly two things children:

2.1 settign.xml (for global) or a specific pom.xml (for specific projects) file configuration information repository
only setting.xml configuration file, for example:
the above mentioned id: that uniquely identifies each repository, in fact, is the name

name: The customized configuration it
url: URL listed below have a lot of copy graph, click to see.

<profiles>
  <profile>
        <id>myProfile</id>
        <repositories>
            <repository>
                <id>maven-public</id>
                <name>Repository for me</name>
                <url>http://localhost:8081/repository/maven-public/</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>maven-public</id>
                <name>PluginRepository for me</name>
                <url>http://localhost:8081/repository/maven-public/</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
  </ Profiles>
   <-! profile defines the use of the warehouse need to be activated before commencement ->  
  <activeProfiles>  
   <activeProfile> myProfile </ activeProfile>  
 </ activeProfiles>  
. 1
2
. 3
. 4
. 5
. 6
. 7
. 8
. 9
10
. 11
12 is
13 is
14
15
16
17
18
19
20
21
22
23
2.2 If you need to upload the jar package to PW, but also for permission to check, this is very simple
2.2.1 configuration server in the setting.xml
remember this id, use the account password here were verify, in pom.xml configuration upload to the warehouse which, to use this id

xml configured distributionManagement see it, id is the server's id, id two configuration through this association up. name: Personalized it url: URL or warehouse value of that column, note the type of snapshot upload and release corresponding to the respective warehouse


























<distributionManagement>
        <snapshotRepository>
            <id>snapshotRepo</id>
            <name>maven-snapshots</name>
            <url>http://localhost:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
        <!--<repository>
            <id>releaseRepo</id>
            <name>maven-release</name>
            <url>http://localhost:8081/repository/maven-snapshots/</url>
        </repository>-->
    </distributionManagement>increases setting.xml file:3, the configuration aliyun mirror12 is. 1110. 9. 8. 7. 6. 5. 4. 32
. 1












<Mirrors>
    <Mirror>
      <ID> alimaven </ ID>
      <name> aliyun Mirror </ name>
      <mirrorOf> Central </ mirrorOf>
      <URL> http://maven.aliyun.com/nexus/content/groups/ public / </ URL>
    </ Mirror>  
  </ Mirrors>
. 1
2
. 3
. 4
. 5
. 6
. 7
. 8
let fly maven come!
----------------
Disclaimer: This article is CSDN blogger "Dreaming Datang 2019" original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq_42428528/article/details/100776877

Published 51 original articles · won praise 80 · views 930 000 +

Guess you like

Origin blog.csdn.net/xiyang_1990/article/details/104221470