"http:// central"在我的Maven settings.xml中意味着什么?

Cod*_*rer 10 maven

我现在一直在复制"样本" settings.xml文件,几乎所有文件似乎都包含一个带有URL的存储库http://central.这让我很烦,因为当然在本地域上可能有一台名为"central"的机器,所以这是一个有效的URN,但它也必须(可能?)对Maven有一些特殊的意义.

它只是常用的速记,但实际的URL被忽略了吗?我可以用其他东西替换它,还是完全删除它?是否记录在任何地方?

如果这很重要,我会在一个公司网络上发展,该公司网络有一个内部iBiblio镜像,它对我们来说是"中心".

Cha*_*suk 18

AFAIK,a bogus URL配置Maven中提到从Nexus下载,如下例所示: -

<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>
Run Code Online (Sandbox Code Playgroud)

nexus profile配置为从下载central repositorya bogus URLhttp://central.

此URL 同一settings.xml文件中的镜像设置覆盖,以指向您的URL single Nexus group.然后,nexus组在activeProfiles元素中列为活动配置文件.

我希望这可能有所帮助.