2012-02-29 68 views
1

爲什麼Nexus 2.0不緩存遠程工件?Nexus 2.0未緩存遠程工件

不確定是否可以提供幫助。如果你能推薦一個更好的地方,請告訴我。

我在64位ubuntu下下載並安裝了Nexus 2.0。 Nexus啓動並在默認端口8081上可用。我爲存儲庫啓用了「下載遠程索引」。每個存儲庫的「瀏覽索引」選項卡顯示索引樹。

但是,當我試圖從maven目標(例如mvn clean)中點擊回購時,它無法在Nexus 2.0緩存中找到任何工件。

$ mvn clean 
[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Maven Rocks 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 is missing, no dependency information available 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.471s 
[INFO] Finished at: Wed Feb 29 10:14:06 MST 2012 
[INFO] Final Memory: 3M/15M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not find artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 in nexus (http://localhost:8081/nexus/content/groups/public) -> [Help 1] 
[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/PluginResolutionException 

Nexus 2.0 Central Repository configuration

日誌級別設置爲DEBUG和擊球的聯繫服務器(通過MVN清潔)之後,下面的關係日誌顯示出來(wrapper.log):

jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Session ID cookie is disabled - session id will not be acquired from a request cookie. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.session.mgt.DefaultSessionManager - Unable to resolve session ID from SessionKey [[email protected]]. Returning null to indicate a session could not be found. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - No authorization found (header or request parameter) 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - Attempting to authenticate Subject as Anonymous request... 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.credential.SimpleCredentialsMatcher - Performing credentials equality check for tokenCredentials of type [org.apache.shiro.crypto.hash.SimpleHash and accountCredentials of type [org.apache.shiro.crypto.hash.SimpleHash] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.credential.SimpleCredentialsMatcher - Both credentials arguments can be easily converted to byte arrays. Performing array equals comparison 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.authc.AbstractAuthenticator - Authentication successful for token [org.apache.shiro.authc.UsernamePasswordToken - anonymous, rememberMe=false]. Returned account [anonymous] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.subject.support.DefaultSubjectContext - No SecurityManager available in subject context map. Falling back to SecurityUtils.getSecurityManager() lookup. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.subject.support.DefaultSubjectContext - No SecurityManager available in subject context map. Falling back to SecurityUtils.getSecurityManager() lookup. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Stateless client session 8887af7f-97b8-46e1-ad59-2b311dcc97e3 is not persisted. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.StatelessAndStatefulWebSessionManager - Session ID cookie is disabled. No cookie has been set for new session with id 8887af7f-97b8-46e1-ad59-2b311dcc97e3 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.web.servlet.SimpleCookie - Added HttpServletResponse Cookie [rememberMe=deleteMe; Path=/nexus; Max-Age=0; Expires=Tue, 28-Feb-2012 17:39:30 GMT] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.apache.shiro.mgt.AbstractRememberMeManager - AuthenticationToken did not indicate RememberMe is requested. RememberMe functionality will not be executed for corresponding account. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.security.filter.authc.NexusSecureHttpAuthenticationFilter - Successfully logged in as anonymous 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.plexus.appevents.SimpleApplicationEventMulticaster - Notifying 23 EventListener about event org.sonatype.nexus.auth.NexusAuthenticationEvent fired ([email protected]) 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event '[email protected]' fired 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - getTargetsForRequest() :: public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.target.DefaultTargetRegistry - Resolving targets for repository='public' for path='/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom' 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.access.DefaultNexusItemAuthorizer - Checking isPermitted() with perms: [nexus:target:1:public:read, nexus:target:any:public:read, nexus:target:3:public:read] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.rest.ContentPlexusResource - Created ResourceStore request for /groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - getTargetsForRequest() :: public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.target.DefaultTargetRegistry - Resolving targets for repository='public' for path='/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom' 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.access.DefaultNexusItemAuthorizer - Checking isPermitted() with perms: [nexus:target:any:public:read, nexus:target:1:public:read, nexus:target:3:public:read] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - public.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.mapping.DefaultRequestRepositoryMapper - No mapping exists for request path [/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom] 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/releases/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases retrieveItem() :: NOT FOUND releases:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The serving of item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is forbidden by Maven repository policy. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - snapshots retrieveItem() :: NOT FOUND snapshots:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - thirdparty.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/nexus-2.0/./../sonatype-work/nexus/storage/thirdparty/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - thirdparty retrieveItem() :: NOT FOUND thirdparty:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - central.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom :: localOnly=false, remoteOnly=false, ProxyMode=BLOCKED_MANUAL 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/sonatype-work/nexus/storage/central/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom --> /opt/sonatype/sonatype-work/nexus/storage/central/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom not found in local storage. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom does not exist locally and cannot go remote, throwing ItemNotFoundException. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - central retrieveItem() :: NOT FOUND central:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - Proxy repository 'central' is is not allowed to issue remote requests (BLOCKED_MANUAL), not adding path '/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom' to NFC 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - apache-snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The path /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is in NFC and still active, throwing ItemNotFoundException. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - codehaus-snapshots.retrieveItem() :: /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2Repository - The path /org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom is in NFC and still active, throwing ItemNotFoundException. 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.nexus.proxy.maven.maven2.M2GroupRepository - public retrieveItem() :: NOT FOUND public:/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 
jvm 1 | 2012-02-29 10:39:30 ERROR [lugin-2.4.1.pom] - org.sonatype.nexus.rest.ContentPlexusResource - Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"! 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.plexus.appevents.SimpleApplicationEventMulticaster - Notifying 23 EventListener about event org.sonatype.nexus.log.internal.LogbackLoggingEvent fired (LogbackLoggingEvent [level=ERROR, message=Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"!, ]) 
jvm 1 | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'LogbackLoggingEvent [level=ERROR, message=Got exception during processing request "GET http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom": Item not found on path "/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" in repository "public"!, ]' fired 

中央分析顯示零開源?

Nexus 2.0 Analyze on Central shows 0 Open Source?

+0

如果查看屏幕截圖,您會看到「存儲庫狀態」爲「服務中 - 遠程手動阻止...」。如果右鍵單擊存儲庫(以管理員身份登錄)並選擇「阻止代理」,則可能會發生這種情況。您可以通過右鍵單擊並從相同的彈出式菜單中選擇「允許代理」來重新啓用。 – 2012-02-29 18:44:27

+0

![Nexus 2.0 Analyze Central](http://i299.photobucket.com/albums/mm283/javapda/ScreenShot2012-02-29at125708PM.png)。 – 2012-02-29 19:59:13

回答

0

當你調出庫查看的Nexus 2.0,這取決於你的屏幕房地產,有一種可能性,即列的數據的一部分可能會被裁剪。在這種情況下,相關數據就會被掩蓋。在這裏所討論的情況下,「存儲庫狀態」列被修剪到列簡單地稱爲「服務中」的點。通過擴大專欄,我們清楚地看到存在情有可原的情況。即,「 - 遠程手動阻止...」。

如果右鍵單擊存儲庫(以管理員身份登錄)並選擇「阻止代理」,則可能發生這種情況。

您可以通過右鍵單擊並從同一彈出菜單中選擇「允許代理」來重新啓用。