2012-06-06 52 views
5

我在使用远程存储库上的命令maven-deploy部署插件时遇到问题。 我安装了最新版本的发布插件(2.0.2)。Grails发布插件未在远程Maven存储库上部署插件

我得到这个错误:

| Loading Grails 2.0.4 
| Configuring classpath. 
| Environment set to development..... 
| Packaging Grails application..... 
| Compiling 33 GSP files for package [myPackage]..... 
| Plugin packaged grails-plugin-myPlugin.jar 
| Skipping POM generation because 'pom.xml' exists in the root of the project.. 
| Error Error executing script MavenDeploy: : Error downloading wagon provider from the remote repository: Missing: 
---------- 
1) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2 
Try downloading the file manually from the project website. 
Then, install it using the command: 
    mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file 
Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-http -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] 
Path to dependency: 
1) unspecified:unspecified:jar:0.0 
2) org.apache.maven.wagon:wagon-http:jar:1.0-beta-2 
---------- 
1 required artifact is missing. 

for artifact: 
unspecified:unspecified:jar:0.0 
from the specified remote repositories: 
central (http://repo1.maven.org/maven2) 
(Use --stacktrace to see the full trace) 

感谢您的帮助

+0

具有u尝试添加旅行车作为插件的依赖? – chrislovecnm

回答

0

这看起来像一个Maven问题:

Maven fails to download a required dependency org.apache.maven.wagon:wagon-http:jar:1.0-beta-2 from http://repo1.maven.org/maven2

因为所需的工件可以在Maven central发现这可能是网络问题的结果

+0

不认为它是一个网络问题。我在代理后面并在maven settings.xml中配置它。我从maven central下载了wagon-http-1.0-beta-2-sources.jar。但是,当我运行mvn安装:install-file -DgroupId = org.apache.maven.wagon -DartifactId = wagon-http -Dversion = 1.0-beta-2 -Dpackaging = jar -Dfile =/path/to/file我还会得到一个错误,告诉您访问repo是被禁止的... – Paul

+0

如果您位于代理之后,它可能会阻止jar下载请求。您可以使用-X -e开关运行maven以获取有助于解决问题的其他信息。 –

+0

当您使用install:install-file时,它应该只使用您的本地存储库而无需任何外部连接...可以是文件系统中的权限问题? – rascio

1

我有相同的公关oblem并能这样处理:

  • 安装Maven2的
  • 配置代理描述here

这足以解决你的问题。

如果你的Maven服务器要求身份验证描述herehere

〜/ .m2目录/ settings.xml中你可以继续:

<settings> 
    <proxies> 
    <proxy> 
     <active>true</active> 
     <protocol>http</protocol> 
     <host>proxyserver.mydomain.com</host> 
     <port>8080</port> 
     <username>user</username> 
     <password>pass</password> 
     <nonProxyHosts>*.bla.com.br|*.blabla.biz</nonProxyHosts> 
    </proxy> 
    </proxies> 
    <servers> 
    <server> 
     <id>myrepo</id> 
     <username>user</username> 
     <password>pass</password> 
    </server> 
    </servers> 
</settings>