java - Missing artifact org.springframework:spring-context:jar:${org.springframework-version} -


please why getting error in 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> 

what seeing ${...} called maven property:

maven properties value placeholder, properties in ant. values accessible anywhere within pom using notation ${x}, x property.

in case, maven trying access property org.springframework-version isn't defined, nothing gets replaced.

you define own maven properties of <properties> section in 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> 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -