1. Warehouse
Local warehouse: in this machine
Private repository: in the server
Remote warehouse: Central warehouse
Create Private Repository: Tools: Nexus
2, Nexus installation and startup
download link:
https://help.sonatype.com/repomanager3/quick-start-guide---proxying-maven-and-npm
Configure environment variables:
After unzipping add bin to environment variables
Start Nexus from the command line:
nexus /start /stop /install /unistall
Access after successful startup
sign out: login Default username and password: admin admin123
Repository Type:
1. The release warehouse of the internal project of the Hosted warehouse
Releases: Release repository for release modules in internal modules
Snapshots: The release repository for the Snapshots module in internal modules
3rd party 3rd party repositories This data is usually downloaded and published by internal personnel
2. proxy: a warehouse for finding data from a remote central warehouse
3. group: a warehouse that is convenient for developers to set up
Creation and release of private servers
Creating and publishing private servers mainly modifies two files
1. The settings.xml file under config in the maven installation directory
Allow users to publish
Set up the mirror (depending on the downloaded private server address): All repository information is obtained from here
The id needs to be the same as the id of the private server address in pom.xml
2. The pom.xml file in the parent module
private server address
Published address (the published address is to modify 127.0.0.1 to the ip of your own machine in Nexus, and then copy)
Publishing requires setting up a repository
A brief introduction to plugins
Plugins are the core of mvn, and all operations performed by maven are done based on plugins
In order for a plugin to implement many similar common maven goals for the plugin, a plugin may have multiple goals
In fact, the important operations in the life cycle are pointed by the target of the plug-in
Bindings for plugins: maven.apache.org/plugins/maven-source-plugin/
The life cycle of maven (three sets of life cycles, not related to each other)
1、clean
2、compile
3, site production site generation report