zoukankan      html  css  js  c++  java
  • 本地代码提交到私服并达成jar包记录

       记录下代码被打成jar包上传到私服以及git的。

      1.以自己的项目为例

        

      本地项目改好了之后,需要上传到私服。pom配置文件如下:

    <distributionManagement>
    <repository>
    <id>nexus-releases</id>
    <url>http://公司私服地址/nexus/content/groups/public</url>
    </repository>
    <snapshotRepository>
    <id>nexus-snapshots</id>
    <url>http://公司私服地址m/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
    </distributionManagement>


    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.0</version>
    <configuration>
    <source>1.8</source>
    <target>1.8</target>
    <encoding>UTF8</encoding>
    <showWarnings>true</showWarnings>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <inherited>true</inherited>
    <configuration>
    <forkMode>always</forkMode>
    <skip>true</skip>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
    <execution>
    <phase>package</phase>
    <goals>
    <goal>jar</goal>
    </goals>
    </execution>
    </executions>
    </plugin>
    </plugins>
    </build>

      

       注意标红地方是两个地址。

      配置好后 执行 mvn install 命令 ,确认是否提交成功

       2.提交到git命令

        1)git init  

        初始化 

        2)去自己公司的git 私服上 新建服务,新建之后 clone 地址 

     

      3)git remote add origin clone地址 

        把项目提交到git私服

      4) git add -A

     5)git commit -m "注释"

    6)git push  origin master

       

  • 相关阅读:
    一个java点菜程序
    团队成员
    CentOS tomcat普通用户执行配置安装
    varnish的监控和调试
    组播协议和组播路由
    AVAYA加外线DID,30B+D
    vi技巧
    CentOS开启Telnet服务
    juniper 虚拟路由
    DOS批处理下操作telnet实现自动远程登录操作
  • 原文地址:https://www.cnblogs.com/thinkingandworkinghard/p/13926535.html
Copyright © 2011-2022 走看看