Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the control mode of version declaration that maven depends on

Shulou Source: shulou.com Published: 2022-06-02 01:47:24 10月03日 Update

Most people do not understand the knowledge points of this article "maven depends on version declaration control mode", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article "what is the version declaration control mode that maven depends on?"

Version declaration control on which maven depends

When writing a new springcloud project

Start error reporting Correct the classpath of your application so that it contains a single, compatible version of.

The idea is to make sure that the version of the jar package is compatible and unique.

Why did this happen? Because the parent module declares the version of a jar package, the child module should not declare version when importing, otherwise it will conflict. Of course, most people will not foolishly re-declare the version, the complicated situation is: the parent module declared jar package contains a jar package imported by the sub-module, but the child module does not know that the parent module contains this jar package, will declare version again.

Here is an example of the registry module of springcloud

The parent module le and the registry module le-registry are all explained in the figure:

The maven setting depends on the version property

In the pom.xml file:

1. Join profiles spring.version 4.0.0.RELEASE 2 and replace org.springframework spring-context ${spring.version} with ${name} at version. The above is about "what is the version declaration control mode of maven dependency?". I believe you all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to learn more about the relevant knowledge, please follow the industry information channel.

Tags: Module content control mode version situation article knowledge article complexity value again main idea most of that is attributes files more steps knowledge points Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology NVidia macOS vpn