Nexus 笔记整理

1、pom文件

<repositories>
        <repository>
            <id>test-nexusid>
            <name>Publicname>
            <url>http://192.168.10.100:8081/nexus/repository/maven-public/url>
        repository>
    repositories>

    <distributionManagement>
        <repository>
            <id>test-nexusid>
            <name>Releasesname>
            <url>http://192.168.10.100:8081/nexus/repository/maven-releases/url>
        repository>
    distributionManagement>

    <pluginRepositories>
        <pluginRepository>
            <id>renrui-nexusid>
            <name>Publicname>
            <url>http://192.168.10.100:8081/nexus/repository/maven-public/url>
        pluginRepository>
    pluginRepositories>

2、maven setting.xml 中增加如下配置

  • profiles 文件中增加
<profile>
      <id>nexusProfileid>
      <repositories>
        <repository>
          <id>test-nexusid>  《id需要和pom中保持一致》
          <name>nexus Repositoryname>
          <url>http://192.168.10.100:8081/nexus/repository/maven-public/url>
          <layout>defultlayout>
          <releases>
            <enabled>trueenabled>
          releases>
          <snapshots>
            <enabled>trueenabled>
          snapshots>
        repository>
      repositories>
      <activeProfiles>
        <activeProfile>nexusProfileactiveProfile>
      activeProfiles>
    profile>
  • servers节点中增加
server>
      <id>test-nexusid>
      <username>adminusername>
      <password>adminpassword>
    server>

你可能感兴趣的:(笔记,java,开发语言)