我有主根項目讓我們把它作爲一個地方是pom.xml的所有模塊的列表和包裝POMAndroid的Maven的插件封裝失敗,分層項目和apklib依賴
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging>
<properties>
<android.version>4.1.1.4</android.version>
<android.target.version>17</android.target.version>
<android.plugin.version>3.6.0</android.plugin.version>
<android.roboelectric.version>2.2</android.roboelectric.version>
<android.support.version.4>r7</android.support.version.4>
</properties>
<modules>
<module>AA</module>
<module>AB</module>
</modules>
的類型
這個項目有兩個孩子,免得說項目AA和AB也勁歌
項目AA是包裝類型apklib並與編譯安裝NOP的問題也比Android的Maven的插件(安卓apklib)這裏是POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
</parent>
<groupId>com.example</groupId>
<artifactId>AB</artifactId>
<packaging>apklib</packaging>
<build>
<finalName>${project.artifactId}-${project.parent.version}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android.plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>17</platform>
<path>${env.ANDROID_HOME}</path>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
項目AB具有依賴性項目AA在POM像波紋管
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>A</artifactId>
<version>0.0.1</version>
</parent>
<groupId>com.example</groupId>
<artifactId>AB</artifactId>
<packaging>apklib</packaging>
<dependencies>
<dependency>
<groupId>com.examplet</groupId>
<artifactId>AA</artifactId>
<version>0.0.1</version>
<type>apklib</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>${android.plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>17</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
在包裝,甚至安卓apklib我geeting錯誤是這樣的
未能執行項目util的目標:可能n解決依賴關係 for com.example.AB:apklib:0.0.1:無法收集[com.example.AA:apklib:0.0.1(提供)]的 依存關係:無法爲 讀取com的工件描述符。 example.AA:apklib:0.0.1:無法找到 神器com。示例:A:POM:0.0.1在中央 (http://repo.maven.apache.org/maven2) - > [求助1]
我已經拼命地跑MVN安裝上項目AA,看起來它安裝在.m2
任何想法?提前致謝。