eclipse cannot recognize ${spring.version} in pom.xml properties, which lead to dependies fail [message #1792624] |
Fri, 20 July 2018 06:18  |
Eclipse User |
|
|
|
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 #1792984 is a reply to message #1792879] |
Thu, 26 July 2018 23:43  |
Eclipse User |
|
|
|
Jerry zhou wrote on Wed, 25 July 2018 10:41Jerry zhou wrote on Wed, 25 July 2018 10:34Do 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: Thu, 26 July 2018 23:46] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.06870 seconds