Missing artifact org.springframework:spring-context:jar:${org.springframework-version}
27,467
Solution 1
What you are seeing as ${...}
is called a Maven property:
Maven properties are value placeholder, like properties in Ant. Their values are accessible anywhere within a POM by using the notation
${X}
, whereX
is the property.
In this case, Maven is trying to access the property org.springframework-version
but it isn't defined, so nothing gets replaced.
You define your own Maven properties with the help of the <properties>
section in the POM:
<properties>
<org.springframework-version>4.2.5.RELEASE</org.springframework-version> <!-- wanted Spring version -->
<hibernate.version>5.1.0.Final</hibernate.version> <!-- wanted Hibernate version -->
</properties>
Solution 2
It is very likely you have not added the spring version number to your pom properties. Add this to your pom.
<properties>
<org.springframework-version>4.2.5.RELEASE</org.springframework-version>
</properties>
Change the version to any version of your choice for your project.
Author by
Blaze
Updated on April 20, 2020Comments
-
Blaze about 4 years
Please why am I getting this error in my pom.xml file
Missing artifact org.springframework:spring-context:jar:${org.springframework-version}
xml file
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${org.springframework-version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework-version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework-version}</version> </dependency>