开发者

How to set a custom Maven repository manager in Grape

开发者 https://www.devze.com 2023-02-09 01:36 出处:网络
I would like to use grape to install a library by command-line. So I\'ve issued the command: grape -V install org.apache.derby derby 10.5.3.0

I would like to use grape to install a library by command-line. So I've issued the command:

grape -V install org.apache.derby derby 10.5.3.0

Grape should use the Maven repository located at http://127.0.0.1:8081/artifactory/webapp/home.html. How can I configure it?

After enabling the verbose mode, I see in the logs:

:: loading settings :: url = jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
no default ivy user dir defined: set to /home/alexyz/.ivy2                                                           
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-public.xml       
no default cache defined: set to /home/alexyz/.ivy2/cache                                                            
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-shared.xml       
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/setting开发者_如何学Pythons/ivysettings-local.xml        
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-main-chain.xml   
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-default-chain.xml
settings loaded (89ms)                                                                                                 
        default cache: /home/alexyz/.ivy2/cache                                                                      
        default resolver: default                                                                                      
        -- 5 resolvers:                                                                                                
        shared [file]                                                                                                  
        default [chain] [local, main]                                                                                  
        local [file]                                                                                                   
        public [ibiblio]                                                                                               
        main [chain] [shared, public]                                                                                  
:: resolving dependencies :: caller#all-caller;working                                                                 
        confs: [default]                                                                                               
        validate = false                                                                                               
        refresh = false                                                                                                
resolving dependencies for configuration 'default'                                                                     
== resolving dependencies for caller#all-caller;working [default]                                                      
== resolving dependencies caller#all-caller;working->org.apache.derby#derby;10.5.3.0 [default->default]                
downloadGrapes: Checking cache for: dependency: org.apache.derby#derby;10.5.3.0 {default=[default]}                    
                tried /home/alexyz/.groovy/grapes/org.apache.derby/derby/ivy-10.5.3.0.xml                            
                tried /home/alexyz/.groovy/grapes/org.apache.derby/derby/jars/derby-10.5.3.0.jar                     
        cachedGrapes: no ivy file nor artifact found for org.apache.derby#derby;10.5.3.0                               
                tried http://repository.codehaus.org/org/apache/derby/derby/10.5.3.0/derby-10.5.3.0.pom

So I tried to update the file org/apache/ivy/core/settings/ivysettings-public.xml in the jar /opt/groovy-1.7.2/lib/ivy-2.1.0.jar for adding a "root" attribute that points to the above repository, but Grape seems to not be able to get the change.


just add a grapeConfig.xml to your grape home dir
Grape-CustomizeIvysettings

0

精彩评论

暂无评论...
验证码 换一张
取 消