将项目发布到私服


配置maven的settings.xml


<servers>
    <server>
      <id>release-nexusid>
      <username>adminusername>
      <password>1qaz2wsxpassword>
    server>

    <server>
      <id>snapshot-nexusid>
      <username>adminusername>
      <password>1qaz2wsxpassword>
    server>
servers>

配置项目的pom.xml文件

<distributionManagement>
    <repository>
        <id>release-nexusid>
        <url>http://localhost:8081/repository/maven-releases/url>     
    repository>
    <snapshotRepository>
        <id>snapshot-nexusid>
        <url>http://localhost:8081/repository/maven-snapshots/url>    
    snapshotRepository>
distributionManagement>

执行mvn deploy命令