maven-release-plugin将快照部署到archiva

 茳小国 发布于 2023-01-29 19:13

我如何强制mvn发布:执行部署到我的发布而不是我的快照存储库?release:perform总是部署SNAPSHOT版本.这没有任何意义恕我直言

我有我的pom.xml

com.mydomain
MyArtifactName
1.0.6-SNAPSHOT
jar


MyArtifactName
http://maven.apache.org
 
    
        central
        http://repo.example.com/artifactory/libs-release-local
        libs-release-local
    
    
        central
        http://repo.example.com/artifactory/libs-snapshot-local
        libs-snapshot-local
    


    HEAD
    http://git.example.com/someUser/myproject
    scm:git:git@git.example.com/someUser/myproject.git
    scm:git:git@git.example.com/someUser/myproject.git


    
        
            org.apache.maven.plugins
            maven-release-plugin
            2.4.2
        
    

Tarator.. 8

我发现了问题:问题是,当使用Git作为SCM时,我需要maven-scm-provider-gitexemaven-release-plugin(版本2.4.2)更新依赖关系:


    
        ....
        
            org.apache.maven.plugins
            maven-release-plugin
            2.4.2
            
                
                    org.apache.maven.scm
                    maven-scm-provider-gitexe
                    1.9
                
            
        
    

我在这里找到了解决方案:mvn release:准备不对pom.xml提交更改

你可以在这里找到一个有效的例子:https://github.com/tarator/releaseplugintest

1 个回答
  • 我发现了问题:问题是,当使用Git作为SCM时,我需要maven-scm-provider-gitexemaven-release-plugin(版本2.4.2)更新依赖关系:

    <build>
        <plugins>
            ....
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.9</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    

    我在这里找到了解决方案:mvn release:准备不对pom.xml提交更改

    你可以在这里找到一个有效的例子:https://github.com/tarator/releaseplugintest

    2023-01-29 19:15 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有