手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS系统中安装Nexus并导入已有的构件库

[日期:2013-05-21] 来源:Linux社区  作者:gao241 [字体:大 中 小]

3、 导入已有的构件库

nexus的构件仓库都保存在sonatype-work目录中,该目录的位置由nexus/conf/nexus.properties配置文件指定。
将已有的sonatype-work目录替换安装后的nexus的sonatype-work目录。
修改sonatype-work/nexus/conf目录下的nexus.xml文件,修改<localStorage>节点下面的<url>子节点为真实路径即可,如central库的配置:

<repository>
      <id>central</id>
      <name>Central</name>
      <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
      <providerHint>maven2</providerHint>
      <localStatus>IN_SERVICE</localStatus>
      <notFoundCacheActive>true</notFoundCacheActive>
      <notFoundCacheTTL>1440</notFoundCacheTTL>
      <userManaged>true</userManaged>
      <exposed>true</exposed>
      <browseable>true</browseable>
      <writePolicy>READ_ONLY</writePolicy>
      <indexable>true</indexable>
      <searchable>true</searchable>
      <localStorage>
        <provider>file</provider>
        <url>file:/home/nexus/sonatype-work/nexus/storage/central</url>
      </localStorage>
      <remoteStorage>
        <provider>apacheHttpClient3x</provider>
        <url>http://repo1.maven.org/maven2/</url>
        <mirrors>
          <mirror>
            <id>http://repo.springsource.org/repo/</id>
            <url>http://repo.springsource.org/repo/</url>
          </mirror>
          <mirror>
            <id>http://gradle.artifactoryonline.com/gradle/libs</id>
            <url>http://gradle.artifactoryonline.com/gradle/libs</url>
          </mirror>
          <mirror>
            <id>http://repo.opengeo.org</id>
            <url>http://repo.opengeo.org</url>
          </mirror>
          <mirror>
            <id>http://repo.maven.apache.org/maven2</id>
            <url>http://repo.maven.apache.org/maven2</url>
          </mirror>
          <mirror>
            <id>http://search.maven.org</id>
            <url>http://search.maven.org</url>
          </mirror>
          <mirror>
            <id>http://repo1.maven.org/maven2/</id>
            <url>http://repo1.maven.org/maven2/</url>
          </mirror>
          <mirror>
            <id>http://download.osgeo.org/webdav/geotools/</id>
            <url>http://download.osgeo.org/webdav/geotools/</url>
          </mirror>
        </mirrors>
      </remoteStorage>
      <externalConfiguration>
        <proxyMode>ALLOW</proxyMode>
        <artifactMaxAge>-1</artifactMaxAge>
        <itemMaxAge>1440</itemMaxAge>
        <cleanseRepositoryMetadata>false</cleanseRepositoryMetadata>
        <downloadRemoteIndex>true</downloadRemoteIndex>
        <checksumPolicy>WARN</checksumPolicy>
        <repositoryPolicy>RELEASE</repositoryPolicy>
        <autoBlockActive>true</autoBlockActive>
        <fileTypeValidation>true</fileTypeValidation>
        <metadataMaxAge>1440</metadataMaxAge>
      </externalConfiguration>
 </repository>

更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14

linux
相关资讯       Nexus 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款