What does "http: // central" mean in my Maven.xml setup?

I copied the "sample" settings.xml files for a long time, and almost all of them seem to contain a repository with the URL http://central . This offends me, because, of course, there may be a machine on the local domain called "central", so this is a valid URN, but it should (maybe?) Also have some special meaning for Maven.

This is just an abbreviation that is commonly used, but the actual URL is ignored? Can I replace it with something else or completely remove it? Is it documented somewhere?

If that matters, I’m developing on a corporate network that has an internal iBiblio mirror that acts as β€œcentral” to us.

+7
source share
1 answer

AFAIK, this is a bogus URL that mentions in Configure Maven to boot from Nexus in the following example: -

 <settings> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> </mirrors> <profiles> <profile> <id>nexus</id> <!--Enable snapshots for the built in central repo to direct --> <!--all requests to nexus via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!--make the profile active all the time --> <activeProfile>nexus</activeProfile> </activeProfiles> </settings> 

nexus profile configured to boot from the central repository with a bogus URL at http://central .

This URL is overridden by the mirror setting in the same settings.xml file to specify the URL of your single Nexus group . The nexus group is then displayed as the active profile in the activeProfiles element.

Hope this helps.

+14
source

All Articles