Sonar does not download plugins

2019-07-17 19:22发布

问题:

Someone knows why Sonar cannot download any plugins? I have a fresh v.3.7.4 installation. That's the first time I'm seeing this awesome server behaviour this way.

Trace:

  2014.04.25 05:13:26 WARN  o.s.s.p.PluginDownloader  Fail to download the plugin (jira, version 1.2) from http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-jira-plugin/1.2/sonar-jira-plugin-1.2.jar
org.sonar.api.utils.SonarException: Fail to downloadhttp://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-jira-plugin/1.2/sonar-jira-plugin-1.2.jar (no proxy)
        at org.sonar.api.utils.HttpDownloader.failToDownload(HttpDownloader.java:143) ~[sonar-plugin-api-3.7.4.jar:na]
        at org.sonar.api.utils.HttpDownloader.download(HttpDownloader.java:138) ~[sonar-plugin-api-3.7.4.jar:na]
        at org.sonar.server.plugins.PluginDownloader.downloadRelease(PluginDownloader.java:126) ~[classes/:na]
        at org.sonar.server.plugins.PluginDownloader.download(PluginDownloader.java:105) ~[classes/:na]
        at org.sonar.server.ui.JRubyFacade.downloadPlugin(JRubyFacade.java:158) [classes/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_55]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_55]
    ...

Environment:

Debian 7 x86
Java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Server VM (build 24.55-b03, mixed mode)

Internet validation:

root@machine:/opt# wget http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-jira-plugin/1.2/sonar-jira-plugin-1.2.jar
--2014-04-25 05:21:58--  http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-jira-plugin/1.2/sonar-jira-plugin-1.2.jar
Resolving repository.codehaus.org (repository.codehaus.org)... 199.193.192.103
Connecting to repository.codehaus.org (repository.codehaus.org)|199.193.192.103|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1864762 (1.8M) [application/java-archive]
Saving to: `sonar-jira-plugin-1.2.jar'

100%[============================================================================>] 1,864,762   3.78M/s   in 0.5s    

2014-04-25 05:22:18 (3.78 MB/s) - `sonar-jira-plugin-1.2.jar' saved [1864762/1864762]

回答1:

Deploy manually your jar files to the repository(mvn deploy:deploy-file), or if you allready done then: Take a look in your local .m2 repository in the path: /org/codehaus/sonar-plugins/sonar-jira-plugin/1.2/

This path should be empty. If there you find files like *lastUpdated then delete all the content from the directory. Next time if you build the project then maven will download the files.

I expect you have a nexus or archiva or(whatewer) repository localy(writible for you) and you not work only with a settings.xml and .m2.