必须获取最新快照或发布

问题描述 投票:0回答:1

我想使用可解析项目最新版本的配置文件。当前带有配置文件的项目不会更改...仅需要更新版本,我不想每隔几周就触摸该项目以调整插件的版本。

    <profile>
        <id>productive</id>
        <properties>
            <myPluginsVersion>RELEASE</myPluginsVersion>
        </properties>
    </profile>

    <profile>
        <id>development</id>
        <properties>
            <myPluginsVersion>LATEST</myPluginsVersion>
        </properties>
    </profile>

使用Maven 3.x不推荐使用LATEST或RELEASE。还有另一种方法吗?我已经使用了具有更新属性的版本插件。但是这个插件更新了我所有的属性,并且该项目现在可以正常工作了。我只想自动更新myPluginsVersion,而不用配置文件接触项目。

maven version maven-3 maven-plugin release
1个回答
0
投票

RELEASELATEST功能被删除是有充分的理由的:Maven的目标是可复制的构建,如果每次执行所附带的版本不同,则Maven的目标将被破坏。为了使您的项目保持最新,您可以运行mvn versions:use-latest-releases,检查是否一切正常,然后提交更新的POM。

© www.soinside.com 2019 - 2024. All rights reserved.