1

我正在实现 Maven 版本插件来管理我们的依赖项,但由于“.RELEASE”后缀而无法排除下一个 Spring 主要版本。

这是我的一个片段pom.xml

<properties>
     <spring.version>4.2.0.RELEASE</spring.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>[${spring.version},5.0.0.RELEASE)]</version>
    <dependency>
</dependencies>

我想要做的是更新到最新的 4.XX (4.3.something) 不允许可能引入重大更改的 5.0 系列。不幸的是,由于后缀的原因,它忽略了应该忽略 5.0.0 版本的“)”。

我目前没有外部化规则 XML 文件(获取它)。有人可以帮忙吗?

编辑:我正在使用以下命令进行更新:

mvn versions:use-latest-releases

编辑2:下面是我对maven插件的配置:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <allowIncrementalUpdates>true</allowIncrementalUpdates>
                    <allowMinorUpdates>true</allowMinorUpdates>
                    <allowMajorUpdates>false</allowMajorUpdates>
                    <allowSnapshots>false</allowSnapshots>
                </configuration>
            </plugin>
4

0 回答 0