ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Paul.Mac...@nokia.com>
Subject RE: resolve behaviour in Main.main() does not properly account for useOrigin
Date Wed, 02 Apr 2008 20:38:42 GMT
Hi,

I'm using the latest beta 2 release.

Attached is a sample settings file and the debug log from running:

org.apache.ivy.Main -conf
F:\helium\svn\helium-next\helium\config\ivy\ivy_settings_build_area.xml
-ivy Z:\output\temp_build_files\ivy\ivy_file.ivy.xml S60 -useOrigin
-debug

Note that the settings file has:

<caches basedir="c:\helium\cache" useOrigin="true"/>

also, and yet the test resolver still has its download() method called
("TestResolver.download() start"). This currently just returns null,
which causes the exception. Now of couse we can implement the download()
method properly but we still would not want to download any data to the
cache, because it is too large.

Thanks

paul
 

>-----Original Message-----
>From: ext Xavier Hanin [mailto:xavier.hanin@gmail.com] 
>Sent: Thursday, March 27, 2008 4:57 AM
>To: ivy-user@ant.apache.org
>Subject: Re: resolve behaviour in Main.main() does not 
>properly account for useOrigin
>
>Usage of useOrigin has changed with Ivy 2, now it's the cache 
>which is responsible for telling if it's configured in 
>useOrigin mode or not, and not the resolve operation. To 
>preserve backward compatibility, we have thus deprecated 
>"useOrigin" in resolve.
>
>Though the command line version of Ivy should still accept the 
>now depcreated useOrigin argument, and take it into account. 
>The lines responsible to handle this are:
>            if (line.hasOption("useOrigin")) {
>                ivy.getSettings().useDeprecatedUseOrigin();
>            }
>
>This changes the default value of useOrigin which should be 
>taken into account in the cache implementation. But we may 
>have a bug due to the recent change...
>
>To track this down, could you please provide the version of 
>Ivy you use, and your debug log (running with -debug) on a simple case?
>
>Xavier
>
>On Thu, Mar 27, 2008 at 12:42 AM, <Paul.Mackay@nokia.com> wrote:
>
>> Hi,
>>
>> I'm running Ivy through the command line and my current requirement 
>> with Ivy is not to download and cache artifacts. I tried setting 
>> useOrigin on the command line but it seems like it may not be 
>> accounted for. Please note my inline comments below:
>>
>>                ResolveOptions resolveOptions = new
>> ResolveOptions().setConfs(confs)
>>                .setValidate(validate);
>>
>> // This call to resolve does not account for any use of useOrigin it 
>> seems, thus it attempts to download dependencies to the cache
>>            ResolveReport report = ivy.resolve(ivyfile.toURL(), 
>> resolveOptions);
>>            if (report.hasError()) {
>>                System.exit(1);
>>            }
>>            ModuleDescriptor md = report.getModuleDescriptor();
>>
>>            if (confs.length == 1 && "*".equals(confs[0])) {
>>                confs = md.getConfigurationsNames();
>>            }
>>            if (line.hasOption("retrieve")) {
>>                String retrievePattern = 
>> settings.substitute(line.getOptionValue("retrieve"));
>>                if (retrievePattern.indexOf("[") == -1) {
>>                    retrievePattern = retrievePattern + 
>> "/lib/[conf]/[artifact].[ext]";
>>                }
>>
>> // Here the option is checked by this is not reached, and is for a 
>> different purpose anyway
>>                ivy.retrieve(md.getModuleRevisionId(), 
>retrievePattern, 
>> new RetrieveOptions()
>>                        
>.setConfs(confs).setSync(line.hasOption("sync"))
>>                        .setUseOrigin(line.hasOption("useOrigin")));
>>
>>
>> Am I missing anything here?
>>
>> thanks
>>
>> paul
>>
>>
>
>
>--
>Xavier Hanin - Independent Java Consultant 
>http://xhab.blogspot.com/ http://ant.apache.org/ivy/ 
>http://www.xoocode.org/
>

Mime
View raw message