How Can I have an empty version tag in Maven3

a 夏天 提交于 2019-12-12 04:58:37

问题


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.


回答1:


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>

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



来源:https://stackoverflow.com/questions/8081060/how-can-i-have-an-empty-version-tag-in-maven3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!