Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail(maven pom properties)
eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail [message #1792624] Fri, 20 July 2018 10:18 Go to next message
Jerry zhou is currently offline Jerry zhouFriend
Messages: 4
Registered: July 2018
Junior Member
i can run "mvn clean package" successfuly in command line.
after i import this project into eclipse as maven project, and launch debug, i got the fail:

Quote:

The archive: /home/see/.m2/repository/org/springframework/spring-webmvc/${spring.version}/spring-webmvc-${spring.version}.jar which is referenced by the classpath, does not exist.


In my pom.xml file:

Quote:

<properties>
......
<spring.version>4.2.1.RELEASE</spring.version>
......
</properties>

......
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>


how can i make eclipse recognize the properties in pom.xml file.
Re: eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail [message #1792877 is a reply to message #1792624] Wed, 25 July 2018 10:34 Go to previous messageGo to next message
Jerry zhou is currently offline Jerry zhouFriend
Messages: 4
Registered: July 2018
Junior Member
Do I have to edit the project's .classpath file manually?
Re: eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail [message #1792879 is a reply to message #1792877] Wed, 25 July 2018 10:41 Go to previous messageGo to next message
Jerry zhou is currently offline Jerry zhouFriend
Messages: 4
Registered: July 2018
Junior Member
Jerry zhou wrote on Wed, 25 July 2018 10:34
Do I have to edit the project's .classpath file manually?

It can't works, my modifies are replaced automatically, because the .classpath file, will be updated by eclipse,
Re: eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail [message #1792984 is a reply to message #1792879] Fri, 27 July 2018 03:43 Go to previous message
Jerry zhou is currently offline Jerry zhouFriend
Messages: 4
Registered: July 2018
Junior Member
Jerry zhou wrote on Wed, 25 July 2018 10:41
Jerry zhou wrote on Wed, 25 July 2018 10:34
Do I have to edit the project's .classpath file manually?

It can't works, my modifies are replaced automatically, because the .classpath file, will be updated by eclipse,


OK, this problem has been resloved~
after I delete the project from eclipse, and delete all eclipse related project file: .classpath ...;
import the project again, the .classpath file was changed, these content dispear:

         <classpathentry kind="var" path="TOMCAT_HOME/lib/servlet-api.jar"/>
	<classpathentry kind="var" path="TOMCAT_HOME/lib/jasper.jar"/>
	<classpathentry kind="var" path="TOMCAT_HOME/lib/jsp-api.jar"/>
	<classpathentry kind="var" path="TOMCAT_HOME/lib/el-api.jar"/>
	<classpathentry kind="var" path="TOMCAT_HOME/lib/annotations-api.jar"/>
	<classpathentry exported="true" kind="var" path="M2_REPO/org/springframework/spring-webmvc/${spring.version}/spring-webmvc-${spring.version}.jar"/>
	<classpathentry exported="true" kind="var" path="M2_REPO/org/springframework/spring-tx/${spring.version}/spring-tx-${spring.version}.jar"/>
	<classpathentry exported="true" kind="var" path="M2_REPO/org/aspectj/aspectjweaver/${aspectjweaver.version}/aspectjweaver-${aspectjweaver.version}.jar"/>
......

[Updated on: Fri, 27 July 2018 03:46]

Report message to a moderator

Previous Topic:Test OM2M
Next Topic:eclipse Gprof timing not shows
Goto Forum:
  


Current Time: Tue Apr 23 08:31:07 GMT 2024

Powered by FUDForum. Page generated in 0.08014 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top