2012-06-06 34 views
5

Tôi gặp sự cố khi triển khai plugin bằng lệnh maven-deploy trên repo từ xa. Tôi đã cài đặt phiên bản mới nhất của plugin Phát hành (2.0.2).Plugin Grails Release không triển khai plugin trên kho lưu trữ maven từ xa

tôi nhận được lỗi này:

| 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) 

Nhờ sự giúp đỡ của bạn

+0

Có u thử thêm toa xe là một phụ thuộc cho các plugin? – chrislovecnm

Trả lời

0

này trông giống như một vấn đề 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

Kể từ khi tạo tác cần thiết có thể được tìm thấy trong Maven central này có thể kết quả của sự cố mạng

+0

không nghĩ rằng nó là một vấn đề mạng. Tôi đang đứng sau một proxy và cấu hình nó trong tệp settings.xml của maven. Tôi đã tải xuống wagon-http-1.0-beta-2-sources.jar từ trung tâm maven. Nhưng khi tôi đang chạy mvn install: install-file -DgroupId = org.apache.maven.wagon -DartifactId = wagon-http -Dversion = 1.0-beta-2 -Dpackaging = jar -Dfile =/path/to/file i cũng nhận được một lỗi mà nói rằng truy cập vào repo bị cấm ... – Paul

+0

Nếu bạn đang đứng sau một proxy, nó có thể chặn các yêu cầu tải xuống jar. Bạn có thể chạy maven bằng các công tắc -X -e để nhận thêm thông tin giúp giải quyết vấn đề. –

+0

Khi bạn sử dụng cài đặt: install-file, nó chỉ nên sử dụng kho lưu trữ cục bộ của bạn mà không có bất kỳ kết nối bên ngoài ... có thể là một vấn đề về quyền trong hệ thống tệp? – rascio

1

Tôi đã có cùng một pr oblem và có thể xử lý nó theo cách này:

  • Cài đặt Maven2
  • Cấu hình Proxy như mô tả here

này là đủ để giải quyết vấn đề của bạn.

Nếu máy chủ của bạn yêu cầu xác thực maven bạn có thể tiến hành như mô tả here hoặc here

~/.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> 
Các vấn đề liên quan