How to get local projects to visit our

Source: Internet
Author: User

b Local Project area when downloading the rack package, the order is: local warehouse storage folder → local (nexus) → Central Warehouse

We can set this in the settings.xml in Maven

<profiles><!--Configure our own factory--<profile> <id>nexusProfile</id> <repositories> <repository> <id>test</id> <name>nexus</name> &LT;URL&G T;http://localhost:8081/nexus/content/groups/public/</url><!--can download releases's rack package, which is open by default--<releases> <enabled>true</enabled> </releases> <!--can download snapshots's rack package, which is off by default and &LT;SNAPSHOTS&G                T <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> <!--this side rewrite the central information--<profile> <id>mycentral</id> <repositorie           s> <repository> <id>central</id> <name>central repository</name> <url>http://rep</url><layout>default</layout> <snapshots> <!--The original default is False. Now that it's changed to true, the configuration in the rack is invalid. @--> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles> <!--to activate the above profile--> <activeProfiles> <activeProfile>mycentral< /activeprofile> </activeProfiles>

And we want to set up a mirror, so that regardless of the download of any type of rack package, will go through this image to our local download, if not downloaded, will automatically go to the central warehouse to download

<mirrors> <!--Mirror|specifies a repository mirror site to use instead of a given repository. The repository that| ThisMirror serves has a ID that matches the mirrorof element of ThisMirror. IDs is used| forInheritance and direct lookup purposes, and must be unique across theSetof mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>huma N Readable Name for  ThisMirror.</name> <url>http://my.repository.com/repo/path</url></mirror> <!--factory image, as long as the factory in Mirrorof to access, will automatically look for the mirror, if the mirror is not accessible to the central factory to download--<mirror> <id>nexusMirror</id> <!--use * indicates that all of them come here to visit, so that you can remove Activeprofiles-<mirrorof>*</mi rrorof> <name>human readable name for  ThisMirror.</name> <url>http://localhost:8081/nexus/content/groups/public/</url></mirror> </mirrors>

How to get local projects to visit our

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.