Maven public service http://maven.aliyun.com
https://hub.docker.com search nexus
docker pull sonatype/nexus3
Docker create directory, create nexus directory
cd /usr/local/
mkdir docker
cd docker/
mkdir nexus
cd nexus/
vi docker-compose.ymlDocker to install and run using the Nexus, docker-compose.yml configured as follows:
version:'3.1'
services:
nexus:
restart:always
image:sonatype/nexus3
container_name:nexus
ports:
-8081:8081
volumes:
- /usr/local/docker/nexus/data:/nexus-datadocker-compose up -d
Visit http: // ip: 8081
View Log
Docker PS
Docker logs containerIDIf the error no authority to see if there is data in the data, so that data have all privileges
cd / data /ll
docker-compose down
chmod 777 data/
docker-compose -up -d
Start nexus memory consumption, see memory state, startup takes nearly nexus 1G memory;
free -h
htop
Landing nexus, the default user name
admin
passwordadmin123
Add Nexus Maven setting.xml the authentication information (the node servers)
nexus-releases
admin
admin123
nexus-snapshots
admin
admin123
Associate project and PW up, add configuration in pom.xml
nexus-releases
Nexus Release Repository
http://192.168.0.148:8081/repository/maven-releases/
nexus-snapshots
Nexus Snapshot Repository
http://192.168.0.148:8081/repository/maven-snapshots/
Note: ID and setting.xml Servers configured in the same
url address matches the address of the warehouse, PW
mvn deploy -Dmaven.test.skip=true
Need to rely on local projects to go find, did not go to the local PW (intranet) to find, PW did not go to the official uniform look;
third-party dependent or write their own jar, can be uploaded to PW manual, version 3.13 supports uploading nexusConfiguring warehouse agent is intended to enable the project to go to a local warehouse rely PW download
nexus
Nexus Repository
http://192.168.0.148:8081/repository/maven-public/
true
true
nexus
Nexus Repository
http://192.168.0.148:8081/repository/maven-public/
true
true
Here you can project from PW to a local warehouse
1, SNAPSHOT version represents the unstable (snapshot version), is still in the development stage, there will be change at any time. When uploading the same version number when the jar package, SNAPSHOT will automatically append the new digital version of the bunch in the back, that is, log label;
2, RELEASE represents the stable version (release version), generally on the line will switch to RELEASE version.
In maven dependency management system that uniquely identifies a dependency is a dependency of the properties of the three configuration, respectively groupId, artifactId and Version. These three properties uniquely identify a component (that is, we usually say the war package and jar package).
- Public warehouse is a collection of snapshots and release versions of maps