Tag: style blog HTTP color file 2014
1. Modify the deployment policy of the warehouse in the private server
The project of the release version should be released to the releases repository. The corresponding snapshot version should be released to the snapshots repository. Maven determines whether the project is a snapshot version based on whether the attributes of the version <version> node in the Pom. xml file contain-snapshot. If the version is snapshot, Maven Automatically releases the project to the snapshots repository when executing the MVN deploy deployment command. To publish a project, you must first set the "deployment policy" of the releases repository and the snapshots repository to "allow redeploy ":
2. repository deployment for configuration items
In Pom. XML, deploy the repository for the release and snapshot versions respectively. The ID is unique and the URL corresponds to the repository path of the releases and snapshots repositories in the private server respectively:
<Uniqueversion> indicates whether to assign a build number containing the timestamp to the snapshot version. The effect is as follows:
<distributionManagement> <snapshotRepository> <id>user-snapshot</id> <name>User Porject Snapshot</name> <url>http://localhost:8081/nexus/content/repositories/snapshots/</url> <uniqueVersion>true</uniqueVersion> </snapshotRepository> <repository> <id>user-release</id> <name>User Porject Release</name> <url>http://localhost:8081/nexus/content/repositories/releases/</url> </repository> </distributionManagement>
3. Enable deployment user
By default, nexus has three users. Deployment users are used to deploy projects:
The default deployment user password is deployment123. You can right-click the menu to change or reset the password:
In settings. XML, configure the server for the preceding deployment repository. The ID must correspond to the preceding deployment repository ID:
<servers> <server> <id>user-release</id> <username>deployment</username> <password>deployment123</password> </server> <server> <id>user-snapshot</id> <username>deployment</username> <password>deployment123</password> </server> … </servers>
4. Publish a project
Right-click Pom. XML-run as-2 Maven build...
After the publishing is successful, you can see the following in the private server Repository:
5. manually upload project components in nexus
On the artifact upload Tab Of The Nexus repository, enter relevant information and manually upload the project component: