What does "http://central" mean in my Maven settings.xml?
maven
Solution
AFAIK, it is `a bogus URL` which mentions at Configure Maven to Download from Nexus as 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>
The `nexus profile` is configured to download from the `central repository` with `a bogus URL` of `http://central`.
This URL is overridden by the mirror setting in the same `settings.xml` file to point to the URL of your `single Nexus group`. The nexus group is then listed as an active profile in the activeProfiles element.
I hope this may help.
Problem
I've been copying "sample" `settings.xml` files for ages now, and almost all of them seem to include a repository with the URL `http://central`. This bugs me, because of course there could actually be a machine on the local domain called "central", so this is a valid URN, but it also must (might?) have some special meaning to Maven. Is it just shorthand that's commonly used, but the actual URL is ignored? Could I replace it with something else, or remove it entirely? Is it documented anywhere? If it matters, I develop on a corporate network that has an internal iBiblio mirror, that acts as "central" for us.