我如何在Maven3中有一个空的版本标签 [英] How Can I have an empty version tag in Maven3

查看:94
本文介绍了我如何在Maven3中有一个空的版本标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望没有版本的依赖项得以解决. Maven 3强迫我使用一个版本,但我无法为我要解决的系统范围jar提供一个版本.谢谢.

I want a dependency to be resolved with no version. Maven 3 is forcing me to use a version, I can't provide a version for the system scope jar I'm resolving. Thanks.

推荐答案

您可以使用如下所示的系统属性定义来解决依赖关系.

You can use a system property define as below to resolve dependency.

<properties>
    <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
</properties>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${org.springframework.version}</version>
</dependency>

您还可以选择提供依赖项版本范围.您可能想要做的是<version>[1.2.3,)</version>

You also have the option to provide Dependency Version Ranges. You might want to do is something like <version>[1.2.3,)</version>

这篇关于我如何在Maven3中有一个空的版本标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆