无法将本地Maven人工制品安装到远程存储库google-android-map [英] Unable to install a local maven artefact to remote repository, google-android-maps

查看:24
本文介绍了无法将本地Maven人工制品安装到远程存储库google-android-map的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置Jenkins构建环境来构建我的Android项目。在很大程度上它还可以,但是有一些依赖项在中央存储库中不可用,例如Google Android Maps API,因此我需要手动将其安装到我的远程存储库。我已经使用mvn install将这些安装到我的本地存储库中,并且运行良好。

到目前为止,我已经进行了一些Google搜索,并且具有以下配置,但是当我尝试将map JAR部署到我的远程Repo时,我看到了以下错误。

mvn deploy:deploy-file -DgroupId=com.google.android.maps -DartifactId=maps -Dversion=8_r1 -Dpackaging=jar -Dfile=C:UsersJames.m2
epositorycomgoogleandroidmapsmaps8_r1maps-8_r1.jar -DrepositoryId=cloudbeesreleases -Durl=https://repository-myusername.forge.cloudbees.com/release/

我看到了这个:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-deploy-plugin:2.5:deploy-file (default-cli) @ standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.450s
[INFO] Finished at: Sat Feb 18 17:01:06 GMT 2012
[INFO] Final Memory: 4M/92M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from the local repository: C:UsersJames.m2
epositorycomgoogleandroidmapsmaps8_r1maps-8_r1.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project standalone-pom: Cannot deploy artifact from the local repository: C:UsersJames.m2
epositorycomgoogleandroidmapsmaps8_r1maps-8_r1.jar
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: Cannot deploy artifact from the local repository: C:UsersJames.m2
epositorycomgoogleandroidmapsmaps8_r1maps-8_r1.jar
    at org.apache.maven.plugin.deploy.DeployFileMojo.execute(DeployFileMojo.java:211)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
[ERROR] 
[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/MojoFailureException

我的settings.xml中有以下内容

<profiles>
    <profile>
      <id>artifactory</id>
      <repositories>
        <repository>
          <id>cloudbeesreleases</id>
          <name>libs-releases</name>
          <url>https://repository-myusername.forge.cloudbees.com/release/</url>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>        
      </repositories>      
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>

是我的配置有误,还是我完全误解了deploy应该如何工作?

推荐答案

错误消息似乎很简单。

无法从本地存储库中部署项目:...

您是否可以尝试将该文件部署到其他位置?此外,this discussion似乎也在同一问题上,并说明了为什么会有问题。

这篇关于无法将本地Maven人工制品安装到远程存储库google-android-map的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆