Maven library files (.idea/libraries/Maven__xxx.xml) are not relative
Hi
In my project I add the libraries directory (.idea/libraries) in the VCS because TeamCity uses it for the inspections.
The problem I have is that on some of the developers computer the Maven__my.library.xxx.xml files aren't using the $MAVEN_REPOSITORY$ variable.
For example this maven dependency org.springframework:spring-core:3.2.3.RELEASE looks like this when generated by my IntelliJ:
<component name="libraryTable"> <library name="Maven: org.springframework:spring-core:3.2.3.RELEASE"> <CLASSES> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE-sources.jar!/" /> </SOURCES> </library> </component>
But on other developers computer it looks like this.
<component name="libraryTable"> <library name="Maven: org.springframework:spring-core:3.2.3.RELEASE"> <CLASSES> <root url="jar://$PROJECT_DIR$/../../../maven/repository/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$PROJECT_DIR$/../../../maven/repository/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$PROJECT_DIR$/../../../maven/repository/org/springframework/spring-core/3.2.3.RELEASE/spring-core-3.2.3.RELEASE-sources.jar!/" /> </SOURCES> </library> </component>
The second XML is not good because it's relative to the location where the developer place its project. Is there a way to define this in IntelliJ?
BTW, all the developer have th esame IntelliJ version, which is 12.1.4 (build #IU-129.713)
Thanks for your help!
Cheers, Alain
Please sign in to leave a comment.
Hello.
Please check Settings / Plugins on every developer's machine, make sure the Maven support plugin is enabled. Enable if not, reload IDEA and check Settings / Path Variables for MAVEN_REPOSITORY entry. Save all to make sure iml files are updated.
Welcome to comment, if this does not help.
Regards,
Alexander.
Hi Alexander,
Thanks for you answer.
Creating a path variable named "MAVEN_REPOSITORY" solved the problem.