我正在尝试使用 Maven-Android-Plugin 将我的 android 项目部署到 Git 存储库。但是,在部署时,我收到如下错误:
无法部署工件:在 github ( https://github.com/rlsahu/AndroidPOC )中找不到工件 com.example:asynctasksample:apk:1.0-20130110.120545-1
请查看以下内容以获取更多详细信息:
F:\Android\AsyncTaskSample>mvn deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building asynctasksample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- android-maven-plugin:3.5.0:generate-sources (default-generate-sources) @ asynctasksample ---
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] Manifest merging disabled. Using project manifest only
[INFO] E:\Nitin\Android-SDK\Android\android-sdk\platform-tools\aapt.exe [package, -m, -J, F:\Android\AsyncTaskSample\target\generated-sources\r, -M, F:\Android\AsyncTaskSample\AndroidManifest.xml, -S, F:\Android\AsyncTaskSample\res, --auto-add-overlay, -A, F:\Android\AsyncTaskSample\assets, -I, E:\Nitin\Android-SDK\Android\android-sdk\platforms\android-10\android.jar]
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ asynctasksample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\Android\AsyncTaskSample\src\main\resources
[INFO] skip non existing resourceDirectory F:\Android\AsyncTaskSample\target\generated-sources\extracted-dependencies\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ asynctasksample ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to F:\Android\AsyncTaskSample\target\classes
[INFO]
[INFO] --- android-maven-plugin:3.5.0:proguard (default-proguard) @ asynctasksample ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ asynctasksample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\Android\AsyncTaskSample\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ asynctasksample ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ asynctasksample ---
[INFO] No tests to run.
[INFO]
[INFO] --- android-maven-plugin:3.5.0:emma (default-emma) @ asynctasksample ---
[INFO]
[INFO] --- android-maven-plugin:3.5.0:dex (default-dex) @ asynctasksample ---
[INFO] C:\Program Files\Java\jdk1.6.0_18\jre\bin\java [-Xmx1024M, -jar, E:\Nitin\Android-SDK\Android\android-sdk\platform-tools\lib\dx.jar, --dex, --output=F:\Android\AsyncTaskSample\target\classes.dex, F:\Android\AsyncTaskSample\target\classes]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ asynctasksample ---
[INFO] Building jar: F:\Android\AsyncTaskSample\target\AndroidPOC.jar
[INFO]
[INFO] --- android-maven-plugin:3.5.0:apk (default-apk) @ asynctasksample ---
[INFO] Copying local assets files to combined assets directory.
[INFO] Enabling debug build for apk.
[INFO] E:\Nitin\Android-SDK\Android\android-sdk\platform-tools\aapt.exe [package, -f, -M, F:\Android\AsyncTaskSample\AndroidManifest.xml, -S, F:\Android\AsyncTaskSample\res, --auto-add-overlay, -A, F:\Android\AsyncTaskSample\target\generated-sources\combined-assets\assets, -I, E:\Nitin\Android-SDK\Android\android-sdk\platforms\android-10\android.jar, -F, F:\Android\AsyncTaskSample\target\AndroidPOC.ap_, --debug-mode]
[INFO] Add native libraries from F:\Android\AsyncTaskSample\libs
[INFO]
[INFO] --- android-maven-plugin:3.5.0:internal-pre-integration-test (default-internal-pre-integration-test) @ asynctasksample ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- android-maven-plugin:3.5.0:internal-integration-test (default-internal-integration-test) @ asynctasksample ---
[INFO] No InstrumentationRunner found - skipping tests
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ asynctasksample ---
[INFO] Installing F:\Android\AsyncTaskSample\target\AndroidPOC.apk to C:\Users\rsahu\.m2\repository\com\example\asynctasksample\1.0-SNAPSHOT\asynctasksample-1.0-SNAPSHOT.apk
[INFO] Installing F:\Android\AsyncTaskSample\pom.xml to C:\Users\rsahu\.m2\repository\com\example\asynctasksample\1.0-SNAPSHOT\asynctasksample-1.0-SNAPSHOT.pom
[INFO] Installing F:\Android\AsyncTaskSample\target\AndroidPOC.jar to C:\Users\rsahu\.m2\repository\com\example\asynctasksample\1.0-SNAPSHOT\asynctasksample-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- downloads-maven-plugin:0.6:upload (default) @ asynctasksample ---
[INFO] Adding 1 download to repository rlsahu/AndroidPOC
[INFO] Deleting existing download: AndroidPOC.apk (id=392972)
[INFO] Adding download: AndroidPOC.apk (24,789 bytes)
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ asynctasksample ---
Downloading: https://github.com/rlsahu/AndroidPOC/com/example/asynctasksample/1.0-SNAPSHOT/maven-metadata.xml
Uploading: https://github.com/rlsahu/AndroidPOC/com/example/asynctasksample/1.0-SNAPSHOT/asynctasksample-1.0-20130110.120545-1.apk
Uploading: https://github.com/rlsahu/AndroidPOC/com/example/asynctasksample/1.0-SNAPSHOT/asynctasksample-1.0-20130110.120545-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.513s
[INFO] Finished at: Thu Jan 10 17:35:49 IST 2013
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project asynctasksample: Failed to deploy artifacts: Could not find artifact com.example:asynctasksample:apk:1.0-20130110.120545-1 in github (https://github.com/rlsahu/AndroidPOC) -> [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
F:\Android\AsyncTaskSample>
我的 pom.xml 文件如下:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>asynctasksample</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<issueManagement>
<url>https://github.com/rlsahu/AndroidPOC/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>github</id>
<name>Android POC</name>
<url>https://github.com/rlsahu/AndroidPOC</url>
</repository>
</distributionManagement>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/rlsahu/AndroidPOC</url>
<connection>scm:git:git://github.com/rlsahu/AndroidPOC.git</connection>
<developerConnection>scm:git:git@github.com:rlsahu/AndroidPOC.git</developerConnection>
</scm>
<developers>
<developer>
<email>rsahu@cybage.com</email>
<url>https://github.com/rlsahu</url>
<id>rlsahu</id>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>1.6_r2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>AndroidPOC</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.5.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<override>true</override>
<sdk>
<!-- platform or api level (api level 4 = platform 1.6)-->
<platform>10</platform>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>downloads-maven-plugin</artifactId>
<version>0.6</version>
<configuration>
<override>true</override>
<message>Building site for ${project.version}</message>
<server>github</server>
</configuration>
<executions>
<execution>
<goals>
<goal>upload</goal>
</goals>
<phase>install</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.7</version>
<configuration>
<override>true</override>
<message>Building site for ${project.version}</message>
<server>AndroidPOC</server>
</configuration>
<executions>
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>site</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
请通过查看以上内容提供您的建议。谢谢。