簡體   English   中英

Nexus 2.0 不緩存遠程工件

[英]Nexus 2.0 not caching remote artifacts

為什么 Nexus 2.0 不能緩存遠程工件?

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

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

但是,當我嘗試從 maven 目標(例如 mvn clean)訪問 repo 時,它無法在 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 中央存儲庫配置

將日志級別設置為 DEBUG 並訪問 nexus 服務器(通過 mvn clean)后,在 nexus 日志(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 [org.apache.shiro.web.session.mgt.WebSessionKey@25bfa475].  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 (org.sonatype.nexus.auth.NexusAuthenticationEvent@48c610af)
jvm 1    | 2012-02-29 10:39:30 DEBUG [lugin-2.4.1.pom] - org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'org.sonatype.nexus.auth.NexusAuthenticationEvent@48c610af' 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

在 Central 上分析顯示零開源?

Central 上的 Nexus 2.0 分析顯示 0 開源?

當您在 Nexus 2.0 中打開 Repositories 視圖時,根據您擁有的屏幕空間,可能會剪切列的一部分數據。 在這種情況下,相關數據會被掩蓋。 在這里有問題的情況下,“存儲庫狀態”列被剪裁到該列僅顯示“服務中”的位置。 通過擴大專欄,很明顯存在情有可原的情況。 即,“- 遠程手動阻止...”。

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

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM