maven section 3 - nexus private server function introduction

1. nexus private server installation
  Download nexus from the official website, pressurize it locally, modify D:\installfile\nexus\nexus-2.12.0-01\bin\jsw\conf\wrapper.conf
wrapper.java.command=D:\ Program Files\Java\jdk1.7.0_79\bin\java
to the directory: D:\installfile\nexus\nexus-2.12.0-01\bin
nexus install
nexus start starts, nexus stop stops, nexus starts and closes like this , the installation is complete
2.nexus warehouse introduction
A.host warehouse. The repository for the release repository of the internal project,


 
B.proxy.
A warehouse C.group warehouse that looks for data from a remote central warehouse . The group warehouse is used to facilitate the developers to set up the warehouse
D. A virtus warehouse (I don’t understand it now)
3. The use of private servers
This is also the most used function of nexus. The purpose is to download the jar package from the private server every time.
A. settings mirror (settings setting.xml) does not exist in the download from the maven central repository



 
B. Configure the warehouse in settings.xml. At this time, all maven projects in this machine will go to the private warehouse to query dependencies




 
4. Project release
needs to be configured in the pom file

<distributionManagement>
		<snapshotRepository>
			<id>snapshots</id>
			<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

 
At the same time configure in the setting.xml file

<server>   
   <id>snapshots</id>   
   <username>admin</username>   
   <password>admin123</password>   
</server>

 

The id is the Repository ID of the factory warehouse to be published to.
5. Create a project factory and create a permission role (omitted)



 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326218026&siteId=291194637