• idea 推送jar包到maven私库


    1.推送到本地仓库

    idea直接install即可

    2.推送到公司私库

    2.1 使用配置公司仓库地址的setting文件

    <?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">
     
      <pluginGroups>
        <!-- pluginGroup
         | Specifies a further group identifier to use for plugin lookup.
        <pluginGroup>com.your.plugins</pluginGroup>
        -->
        
      </pluginGroups>
    
      <proxies>
        
      </proxies>
    
    
      <servers>
     
      	<server>
          <id>admin</id>
          <username>admin</username>
          <password>admin123</password>
        </server>
       
      </servers>
    
      
      <mirrors>
        <mirror>
          <id>center</id>
          <mirrorOf>*</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://192.168.6.1/nexus/content/groups/public</url>
        </mirror>
        <mirror>
          <id>releases</id>
          <mirrorOf>*</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://192.168.6.1/nexus/content/groups/releases</url>
        </mirror>
        <mirror>
          <id>thirdparty</id>
          <mirrorOf>*</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://192.168.6.1/nexus/content/repositories/thirdparty</url>
        </mirror>
        <mirror>
          <id>alimaven</id>
          <name>aliyun maven</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
          <mirrorOf>central</mirrorOf>        
        </mirror>
    
      </mirrors>
      
      
      <profiles> 
       	<profile>  
          <id>myprofile</id>  
          <repositories>  
            <repository>  
                <id>central</id>                                     
                <url>http://192.168.6.1/nexus/content/groups/public</url>                        
                <releases>  
                    <enabled>true</enabled>  
                </releases>  
                <snapshots>  
                    <enabled>true</enabled>  
                </snapshots>  
            </repository>
            <repository>  
                <id>releases</id>                                     
                <url>http://192.168.6.1/nexus/content/groups/releases</url>                        
                <releases>  
                    <enabled>true</enabled>  
                </releases>  
                <snapshots>  
                    <enabled>true</enabled>  
                </snapshots>  
            </repository>    
          </repositories>
        </profile>  
        
        <profile>
          <!--<id>jdk-1.7</id>
    
          <activation>
     
            <activeByDefault>true</activeByDefault>      	  
            <jdk>1.7</jdk>
          </activation>
    			<properties>  
            <maven.compiler.source>1.7</maven.compiler.source>  
            <maven.compiler.target>1.7</maven.compiler.target>  
            <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>  
         </properties>  
    			
          <repositories>
            <repository>
              <id>jdk16</id>
              <name>Repository for JDK 1.6 builds</name>
              <url>http://www.myhost.com/maven/jdk16</url>
              <layout>default</layout>
              <snapshotPolicy>always</snapshotPolicy>
            </repository>
          </repositories>
     
    			-->
        </profile>
    
      </profiles>
    
      <activeProfiles>
        <activeProfile>myprofile</activeProfile>
      </activeProfiles>
      
    </settings>
    
    2.2 在pom中添加
    <distributionManagement>
            <repository>
                <id>admin</id>
                <name>release</name>
                <url>http://192.168.6.1/nexus/content/repositories/thirdparty/</url>
            </repository>
            <snapshotRepository>
                <id>admin</id>
                <name>maven-snapshots</name>
                <url>http://192.168.6.1/nexus/content/repositories/thirdparty/</url>
            </snapshotRepository>
        </distributionManagement>
    

    注意 : id 里的admin 与 seting文件中的sever id保持一致 url地址注意更改

    2.3 idea 直接 depoly即可
  • 相关阅读:
    在Android工程中运行Java程序问题
    sklearn.neighbors.kneighbors_graph的简单属性介绍
    python中的“.T”操作
    numpy中关于*和dot的区别
    一个Window Service引发的感想
    项目管理之初步认识
    由敏捷开发中开发认领自己的工作内容的感想
    SQL Server2008 inner join多种方式的实践
    浅谈业务逻辑和技术哪个更重要
    敏捷人生之初步认识
  • 原文地址:https://www.cnblogs.com/zhucww/p/10820354.html
Copyright © 2020-2023  润新知