idea组件上传nexus

前提环境:nexus

settings文件

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>E:\repository</localRepository>

  <pluginGroups>
  </pluginGroups>

  <proxies>
  </proxies>
  <servers>
    <server>  
        <id>nexus</id>  
        <username>admin</username>  
        <password>1234</password>  
    </server> 
  </servers>

  <mirrors>
	 <mirror>  
        <id>nexus</id>  
        <name>nexus repository</name>  
        <url>http://192.168.1.48:8081/repository/group_repo/</url>  
        <mirrorOf>central</mirrorOf>  
    </mirror> 
  </mirrors>

  <profiles>
    <profile>
      <id>jdk-1.8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>
  </profiles>

</settings>

pom.xml配置

这里repository的id要与settings文件一样,这里的url配置的远程仓库类型要是hosted类型的

    <!--发布配置管理-->
    <distributionManagement>
        <repository>
            <id>nexus</id>
            <url>http://192.168.1.48:8081/repository/hosted_repo/</url>
        </repository>
    </distributionManagement>

idea组件上传nexus

上传组件

点击deploy

idea组件上传nexus

idea组件上传nexus

上传成功后,nexus远程仓库hosted_repo也能看到

idea组件上传nexus

idea组件上传nexus

上一篇:安装PHP的GD扩展


下一篇:PHP设置Redis key在当天有效