如何将 apk 文件上传到 nexus 存储库管理器?
How I can upload an apk file to the nexus repository manager?
我正在尝试将 apk 文件发布到 maven。
所以在 nexus 存储库管理器(maven2 托管)中,我可以通过一些步骤来做到这一点,并且
在这里我可以定义文件扩展名:
它工作正常,我可以从 nexus 存储库下载 apk 文件:
那么现在我可以用 cmd 中的 pom.xml 做同样的事情吗?
这是我的 pom.xml 配置:
4.0.0
<groupId>android-maven-plugin</groupId>
<artifactId>android</artifactId>
<packaging>apk</packaging>
<version>2.0.0</version>
<name>my-maven</name>
<url>http://maven.apache.org</url>
<distributionManagement>
<repository>
<id>android</id>
<name>release softx</name>
<url>http://#################.com/repository/android/</url>
</repository>
<snapshotRepository>
<id>android</id>
<name>snapshot softx</name>
<url>http://#################.com/repository/android-snapshot/</url>
</snapshotRepository>
</distributionManagement>
</project>
我在 运行 mvn deploy:
之后得到了这个
[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were
encountered while processing the POMs: [ERROR] Unknown packaging: apk
@ line 7, column 14 @ [ERROR] The build could not read 1 project ->
[Help 1] [ERROR] [ERROR] The project
android-maven-plugin:android:2.0.0
(C:\search\meteor\androidapp\android\project\app\build\outputs\apk\release\pom.xml)
has 1 error [ERROR] Unknown packaging: apk @ line 7, column 14
[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/ProjectBuildingException
如果我使用 jar 进行打包,它就可以正常工作。但是我在 nexus 中得到了一个 jar 文件,我无法使用它。
我怀疑您需要使用 github。com/sonatype-nexus-community/nexus-repository-apk 否则您会受到 Maven 的限制(使用 Maven 存储库时)。
我正在尝试将 apk 文件发布到 maven。 所以在 nexus 存储库管理器(maven2 托管)中,我可以通过一些步骤来做到这一点,并且 在这里我可以定义文件扩展名:
它工作正常,我可以从 nexus 存储库下载 apk 文件:
那么现在我可以用 cmd 中的 pom.xml 做同样的事情吗? 这是我的 pom.xml 配置:
<groupId>android-maven-plugin</groupId>
<artifactId>android</artifactId>
<packaging>apk</packaging>
<version>2.0.0</version>
<name>my-maven</name>
<url>http://maven.apache.org</url>
<distributionManagement>
<repository>
<id>android</id>
<name>release softx</name>
<url>http://#################.com/repository/android/</url>
</repository>
<snapshotRepository>
<id>android</id>
<name>snapshot softx</name>
<url>http://#################.com/repository/android-snapshot/</url>
</snapshotRepository>
</distributionManagement>
</project>
我在 运行 mvn deploy:
之后得到了这个[INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Unknown packaging: apk @ line 7, column 14 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project android-maven-plugin:android:2.0.0 (C:\search\meteor\androidapp\android\project\app\build\outputs\apk\release\pom.xml) has 1 error [ERROR] Unknown packaging: apk @ line 7, column 14 [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/ProjectBuildingException
如果我使用 jar 进行打包,它就可以正常工作。但是我在 nexus 中得到了一个 jar 文件,我无法使用它。
我怀疑您需要使用 github。com/sonatype-nexus-community/nexus-repository-apk 否则您会受到 Maven 的限制(使用 Maven 存储库时)。