When I use:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency>
on the console I get the following error message:
'dependencies.dependency.version' for org.springframework:spring-context:jar must be a valid version but is '${spring.version}'. @ line 40, column 19
Do I have to do a manually configuration of Maven? I've seen this kind of dependency but there is no explanation how to do it properly.
${spring.version}
is a placeholder, you need to configure its actual value in <properties>
block:
<properties> <spring.version>3.0.5.RELEASE</spring.version> </properties>
I don't really agree with the first answer.
Using ${spring.version}
is a convenient way to config version.
In xml file, you need to set property like follow:
<properties> <spring.version>4.3.3.RELEASE</spring.version> </properties>
Then it will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With