使用gitee创建远程maven仓库

1. 创建一个项目作为远程仓库

2. 打包项目发布到远程仓库

id随意,url是打包到哪个文件夹里面

在需要打包的项目的pom中添加

java 复制代码
    <distributionManagement>
        <repository>
            <id>handsomehuang-maven</id>
            <url>file:D:/workspace/java/2023/repo/maven-repository/</url>
        </repository>
    </distributionManagement>

3. 将打包的项目push到远程仓库

记得先关联起来...

java 复制代码
git add .
git commit -m "commit"
git push -u origin "master"

4. 使用远程仓库

pom 复制代码
    <dependencies>
     <!--   使用远程仓库的maven    -->
        <dependency>
            <groupId>com.huang.lightweight</groupId>
            <artifactId>lightweight-client-spring-boot-starter</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>
    
     <!--   配置一个远程仓库   -->
    <repositories>
        <repository>
            <!--   随意    -->
            <id>handsomehuang-maven</id>
                <!--   {仓库地址}/raw/分支    -->
            <url>https://gitee.com/huangjianguo2000/maven-repository/raw/master</url>
        </repository>
    </repositories>
相关推荐
rabbit_pro5 分钟前
Java使用Mybatis-Plus封装动态数据源工具类
java·python·mybatis
期待のcode11 分钟前
Java虚拟机类加载机制
java·开发语言
短剑重铸之日19 分钟前
《SpringBoot4.0初识》第四篇:原生镜像
java·原生镜像·springboot4.0
程序员欣宸22 分钟前
LangChain4j实战之十二:结构化输出之三,json模式
java·人工智能·ai·json·langchain4j
天若有情67339 分钟前
打破思维定式!C++参数设计新范式:让结构体替代传统参数列表
java·开发语言·c++
亲爱的非洲野猪1 小时前
从ReentrantLock到AQS:深入解析Java并发锁的实现哲学
java·开发语言
wheelmouse77881 小时前
如何设置VSCode打开文件Tab页签换行
java·python
yangminlei1 小时前
Spring Boot——日志介绍和配置
java·spring boot
廋到被风吹走1 小时前
【Spring】Spring Boot Starter设计:公司级监控SDK实战指南
java·spring boot·spring
码头整点薯条1 小时前
启动报错:Invalid value type for attribute ‘factoryBeanObjectType‘ 解决方案
java