Android Maven IntelliJ project with git submodules

We have a maven project with Git submodules contrib/holo-everywhere and contrib/ActionBarSherlock

Root pom.xml describes modules like that:

<module>contrib/holo-everywhere/resbuilder</module>
<module>contrib/holo-everywhere/library</module>
<module>contrib/holo-everywhere/addons/preferences</module>
<module>contrib/holo-everywhere/addons/slidingmenu</module>
<module>contrib/ActionBarSherlock/actionbarsherlock</module>

maven build from console works perfectly, but when project is improted into IntelliJ IDEA errors occurs.

Each and every pom.xml like contrib/ActionBarSherlock/actionbarsherlock/pom.xml can't resolve dependecy version from dependecy management in it's projects parent pom. In this case it's contrib/ActionBarSherlock/pom.xml

contrib/ActionBarSherlock/pom.xml

 <dependency>
    <groupId>android</groupId>
    <artifactId>android</artifactId>
    <version>${android.version}</version>
  </dependency>

contrib/ActionBarSherlock/actionbarsherlock/pom.xml

 <dependency>
    <groupId>android</groupId>
    <artifactId>android</artifactId>
    <scope>provided</scope>
 </dependency>

This happens only with these submodules that are in contrib dir. We have maven modules that depend on parent pom - their dependencies are resolved fine.

Is it a bug or should I import projects some other way?


<relativePath>到父pom.xml丢失。

链接地址: http://www.djcxy.com/p/61774.html

上一篇: intellij Project make和Maven Compile之间的区别?

下一篇: Android Maven IntelliJ项目与git子模块