您可以将您的项目配置为依赖于 EventKitchenCore 的Maven Artifact,因此,Maven 将为您处理:
EventKitchenCore pom.xml:
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>com.adamgaskins</groupId>
<artifactId>event-kitchen-core</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>EventKitchenCore</name>
</project>
EventKitchenDesktop pom.xml:
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>com.adamgaskins</groupId>
<artifactId>event-kitchen-desktop</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>EventKitchenDesktop</name>
<dependencies>
<dependency>
<groupId>com.adamgaskins</groupId>
<artifactId>event-kitchen-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependencies>
</project>
EventKitchenAndroid pom.xml:
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>com.adamgaskins</groupId>
<artifactId>event-kitchen-android</artifactId>
<packaging>apk</packaging> <!-- for this, you need the maven-android-plugin -->
<version>0.0.1-SNAPSHOT</version>
<name>EventKitchenAndroid</name>
<dependencies>
<dependency>
<groupId>com.adamgaskins</groupId>
<artifactId>event-kitchen-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependencies>
</project>
不要忘记 SNAPSHOT 后缀,否则,Maven 将不会更新您的更改。