构建Maven Android SDK Deployer的失败

时间:2014-04-15 09:49:30

标签: android maven ubuntu java-7

我按照OwnCLoud WIKI来克隆maven安卓库:

因此,必须先安装maven-android-sdk-deployer

当我到达第3步时,我试试这个:

mvn -pl com.simpligility.android.sdk-deployer:android-19 -am install

但是我得到以下输出:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Maven Android SDK Deployer
[INFO] Android Platforms
[INFO] Android Platform 4.4 API 19
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Android SDK Deployer 2.4.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-maven) @ maven-android-sdk-deployer ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
Check for Maven version >=3.1.1 failed. Upgrade your Maven installation.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Maven Android SDK Deployer ........................ FAILURE [1.073s]
[INFO] Android Platforms ................................. SKIPPED
[INFO] Android Platform 4.4 API 19 ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.216s
[INFO] Finished at: Tue Apr 15 12:42:53 AST 2014
[INFO] Final Memory: 19M/223M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-maven) on project maven-android-sdk-deployer: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

我已经添加了Android SDK' tools /'和' platforms-tools /'环境路径变量中的文件夹。

PATH=$PATH:/home/administrator/dev/adt-bundle-linux-x86_64-20140321/sdk/tools/:/home/administrator/dev/adt-bundle-linux-x86_64-20140321/sdk/platform-tools/

另外:

 export ANDROID_HOME=/home/administrator/dev/adt-bundle-linux-x86_64-20140321/sdk/

更新:

Besdies,Android支持库和存储库已经安装 enter image description here

1 个答案:

答案 0 :(得分:2)

FOUND!

Maven应升级为> = 3.1.1

参见:https://askubuntu.com/questions/420281/how-to-update-maven-3-0-4-3-1-1/420294#420294

cd ~/Downloads


wget http://apache.mirrors.timporter.net/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.tar.gz  #Download Package


tar -xzvf apache-maven-3.1.1-bin.tar.gz #Extract Package 

sudo mkdir -p /usr/local/apache-maven

sudo mv apache-maven-3.1.1-bin.tar.gz /usr/local/apache-maven
sudo ln -s /usr/local/apache-maven/apache-maven-3.2.1/bin/mvn /usr/bin/mvn