找到了解决方案。这要容易得多。
父 pom.xml:
...
<groupId>com.lutshe</groupId>
<artifactId>doiter</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>doiter-android</module>
<module>doiter-server</module>
<module>doiter-model</module>
</modules>
...
child1 (android 项目) pom.xml:
...
<parent>
<groupId>com.lutshe</groupId>
<artifactId>doiter</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.lutshe</groupId>
<artifactId>doiter-android</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<dependencies>
<dependency>
<groupId>com.lutshe</groupId>
<artifactId>doiter-models</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
...
child2(服务器)pom.xml:
...
<parent>
<groupId>com.lutshe</groupId>
<artifactId>doiter</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.doiter.server</groupId>
<artifactId>doiter-server</artifactId>
<version>0.1.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.lutshe</groupId>
<artifactId>doiter-models</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
...
child3(共享模型) pom.xml:
...
<parent>
<groupId>com.lutshe</groupId>
<artifactId>doiter</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.lutshe</groupId>
<artifactId>doiter-model</artifactId>
<version>1.0-SNAPSHOT</version>
...